Normally dot files are not included for wildcard expansion:
% echo *
Applications Desktop Documents Downloads Library Movies Music Pictures Public bin
If I explicitly ask for dot files, I get them:
% echo * .*
Applications Desktop Documents Downloads Library Movies Music Pictures Public bin . .. .CFUserTextEncoding .DS_Store .Trash .adobe .bash_history .cups .gitconfig .gnupg .history .lesshst .netbeans .scanview.cfg .sqlite_history .ssh .swt .systemmodeler .tcshrc .viminfo
However I also get .
and ..
. I don't want those, for example if I'm passing to du -s
where I want the size of every item in the directory. Is there some pattern that gives me just what's in the current directory, and everything in the current directory without .
and ..
?
I use tcsh.
(With regard to the "This question may already have an answer here:" note above: no this question doesn't have an answer there, since that answer only works for bash.)
bash
. – Stéphane Chazelas May 14 '13 at 15:54