I'm trying to list all the hidden files in a directory, but not other directories, and I am trying to do this using only ls and grep.
ls -a | egrep "^\."
This is what I have so far, but the problem is that it also lists hidden directories, when I don't want that.
Then, completely separately, I want to list the hidden directories.
find
?? why to limit self w/ls
andgrep
??find
): 1)find . -maxdepth 1 -name '.*' -type f
to find "hidden" files 2)find . -maxdepth 1 -name '.*' -type d
to find "hidden" directories