Tag Info

New answers tagged

2

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.


3

Try this: shopt -s dotglob echo *


0

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.


0

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


0

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


0

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