I need recursive listing of directories for my DVD backups. The prefect format is following:
Name of the directory:
subdirectory0/
subdirectory1/
size date time name0.txt
size date time name1.sh
size date time name2.odt
I got it with this crazy command:
ls -alFRgGv --time-style='+%Y-%m-%d %H:%M:%S' --group-directories-first | sed -r 's/^[drwx-]{10} *[0-9]* //;/^total /d;/.*\.{1,2}\/$/d ';
Please, is there any other way how to omit permissions and hard links in ls output? ("ls", not with the command "find")
Post scriptum:
There are some crazy numbers after total. There is "total 18" and only 2 files in the directory. Are those all hard links together?
0 Answers