3

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?

10

The 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 '.*'
| improve this answer | |
5

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.

| improve this answer | |
2

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.