Can't see files from console

I'm a newbie, so please forgive me if this is a dumb question. I have a file (a downloaded package) that appears on my desktop when running a GUI (Xfce), but does not show up when I run LS from within the console (after changing to the Desktop folder). Can anyone explain this?

Thanks.
 
I dont't really know, but maybe you are in the wrong Desktop-folder?
Maybe of the wrong user?

And what's the output of
Code:
ls -l
?

Furthermore I would try to copy the file to another directory and see if you can find it there in the console.

Well, that are just some suggestions of another newbie ;)
 
Beastie said:
AFAIK, no, unless you're logged in as root.

Ah okay,
atm I just explore FreeBSD on a testing machine and use most of the time the root account. That explains why I see allways see the hidden files :)

@jimheard:
Do you tried it as root or as a normal user?
 
Beastie said:
AFAIK, no, unless you're logged in as root.

Even as root # ls doesn't list hidden files. For that you need to run # ls -a or define an alias.

Run # alias to check root's alias or % alias to check your user's alias.

Alias can be set at any time or added to user's .cshrc if using t/csh shells.

For further information have a look at ls(1).
 
All files beginning with a dot are hidden. If you want to list them run % ls -a.

Btw hidden =! not having permissions. But that's another story.
 
tangram said:
All files beginning with a dot are hidden. If you want to list them run % ls -a.

Btw hidden =! not having permissions. But that's another story.
When I log in as root i.e. in home directories I can sie dotted files with
Code:
ls
Logged in as a normal user they really are hidden and I only see them with
Code:
ls -a
 
Most likely your root account as [cmd=]ls[/cmd] aliased to [cmd=]ls -a[/cmd].

And that's why I said it depends on the aliases that are setup for each user.

Run

Code:
alias

as both root and user and see the differences.
 
tangram said:
Even as root # ls doesn't list hidden files.
Yes, it does and I haven't changed anything in .cshrc.

ls() says:
Code:
-A    Include directory entries whose names begin with a dot (`.') except for . and ...  [u]Automatically set for the super-user unless -I is specified[/u].

-a    Include directory entries whose names begin with a dot (`.').
Both -a and -A do the same (including the "super-user" thing), -A just doesn't display current and parent directories.

The % ls command itself is not aliased by default for any user, not even root.
However, there's % la, which is an alias for % ls -a.
All users, including root, have by default the same aliases in .cshrc (if they're using csh, which is the default shell for root).
 
Beastie said:
Yes, it does and I haven't changed anything in .cshrc.
Confirm:

Code:
dice@maelcum:~>ls
backup             maelcum_backup.tgz
dice@maelcum:~>su -
Password:
root@maelcum:~#ls
.cshrc   .history .k5login .lesshst .login   .profile .ssh
 
Hmm... weird.

I also confirmed with # su -: it does list hidden files.

The odd thing is that having a look at /usr/src/etc/root/dot.cshrc, there isn't an alias.

Code:
# cat /usr/src/etc/root/dot.cshrc

# $FreeBSD: src/etc/root/dot.cshrc,v 1.30.8.1 2009/04/15 03:14:26 kensmith Exp $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
#

alias h         history 25
alias j         jobs -l
alias la        ls -a
alias lf        ls -FA
alias ll        ls -lA

# A righteous umask
umask 22

set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)

setenv  EDITOR  vi
setenv  PAGER   more
setenv  BLOCKSIZE       K

if ($?prompt) then
        # An interactive shell -- set some stuff up
        set prompt = "`/bin/hostname -s`# "
        set filec
        set history = 100
        set savehist = 100
        set mail = (/var/mail/$USER)
        if ( $?tcsh ) then
                bindkey "^W" backward-delete-word
                bindkey -k up history-search-backward
                bindkey -k down history-search-forward
        endif
endif
 
tangram said:
The odd thing is that having a look at /usr/src/etc/root/dot.cshrc, there isn't an alias.
it's hardcoded into ls(1)
Code:
src/bin/ls/ls.c:
        /* Root is -A automatically unless -I. */
        if (!f_listdot && getuid() == (uid_t)0 && !f_noautodot)
                f_listdot = 1;
 
Problem solved

Thanks to all for the helpful and informative suggestions. As I initially guessed, my question was indeed a dumb one. Turns out I was logged in as root when I downloaded the file, so I was looking in the wrong folder. The file was in /root/Desktop, not /home/jim/Desktop.

Thanks again for the help.
 
Back
Top