In DOS, the command dir /s /ah
will recurse through every subdirectory and show all files with the "hidden" attribute.
What is the linux equivalent?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityThe standard linux filesystems don't come with a "hidden" attribute for files, but convention is that files with names starting with a dot are not shown by e.g. ls
. You can find these with with find
find . -name '.*'
I usually use ls -lAR
which recurses through a directory tree, showing file attributes and any 'hidden' files (commonly called 'dot files' because they start with a dot ('.'). You could also replace the 'A' with 'a' to show the current and parent directory in each, but except for the top-level directory, all are shown in the parent's directory.
I have the following aliases in my .zshrc
:
alias l.='ls -CAF --ignore=\*'
alias ll.='ls -CAlhF --ignore=\*'
They show dotfiles in the current directory. In case you want to recurse through subdirectories, add the -R
switch to ls
.