Tag Info

New answers tagged


As an alternative to Cyrus' answer, you could also loop over and print all directory contents in one line: for file in {.*,*}; do echo "$file"; done However, this is slightly different from ls -A as it includes . and ..; but may still be of use.


Try this: shopt -s dotglob echo *


printf "%s\n" */ will list all directories in the $PWD. echo */ will also work, but in a long one-line, more difficult when names have spaces.


Use find to locate files - using the numeric character set [0-9] to match files with a number, and suffix .php find . -name \*[0-9]\*.php


find . -name '[0-9].php' Should find any file with a number in it.


You can also use du -csh foldername/* which gives file and folder sizes under "foldername" separately and the total size in last row.

Top 50 recent answers are included