ls -l
Beastie said:Maybe it's a dot file (i.e. hidden).
Try doing a$ ls -a
.
Beastie said:AFAIK, no, unless you're logged in as root.
Beastie said:AFAIK, no, unless you're logged in as root.
# ls
doesn't list hidden files. For that you need to run # ls -a
or define an alias.# alias
to check root's alias or % alias
to check your user's alias.When I log in as root i.e. in home directories I can sie dotted files withtangram 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.
ls
ls -a
Okay. Sorry, I didn't know about aliases so far.tangram said:And that's why I said it depends on the aliases that are setup for each user.
Yes, it does and I haven't changed anything in .cshrc.tangram said:Even as root# ls
doesn't list hidden files.
-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 (`.').
% ls
command itself is not aliased by default for any user, not even root.% la
, which is an alias for % ls -a
.Confirm:Beastie said:Yes, it does and I haven't changed anything in .cshrc.
dice@maelcum:~>ls
backup maelcum_backup.tgz
dice@maelcum:~>su -
Password:
root@maelcum:~#ls
.cshrc .history .k5login .lesshst .login .profile .ssh
# su -
: it does list hidden files.# 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
it's hardcoded into ls(1)tangram said:The odd thing is that having a look at /usr/src/etc/root/dot.cshrc, there isn't an alias.
src/bin/ls/ls.c:
/* Root is -A automatically unless -I. */
if (!f_listdot && getuid() == (uid_t)0 && !f_noautodot)
f_listdot = 1;