Right now i am able to list all the files using -l, and i can break it down to filename etc. using awk
e.g
ls -l ~/directory1 | awk '{print $9, $5}'
which returns something like
filename filesize
How could i also display the file type?
Is this what you are looking for?
find . -exec stat --format="%n %s %F" {} \;
This finds all items in the current directory, change to suite your needs, and runs the stat(1) command on each item. The %n is the item's name. The %s is the item's size. The %F is the item's type.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments