Now this should be easy, but I want a way of listing all of the plain files in a directory, without any directories listed and without recursing into the directories.
The only thing that we've come up with is
ls -p | grep -v /
Any other ideas?
Now this should be easy, but I want a way of listing all of the plain files in a directory, without any directories listed and without recursing into the directories.
The only thing that we've come up with is
ls -p | grep -v /
Any other ideas?
test for directories
for files in *; do if [ ! -d "$files" ];then echo $files; fi; done
ls -ald * | grep \^\-
(Note: This will not show files starting with a full stop character).