|
|
Question : ls command in shell script
|
|
I want to run ls command on a particular directory and retrieve all the permissions/ownership for the sub dir and files within that directory using shell script. Please advise.
|
Answer : ls command in shell script
|
|
THe order of the output columns:
$ find ./tmp -ls 541836 1 drwxr-xr-x 2 oracle dba 512 Apr 17 07:48 ./tmp 543431 26 -rwxrwxrwx 1 oracle dba 26509 Mar 5 08:40 ./tmp/oralogs.txt 543446 1 -rwxr-xr-x 1 oracle dba 297 Apr 17 08:53 ./tmp/m0 543447 1 -rwxrwxrwx 1 oracle dba 2 Apr 17 07:57 ./tmp/csc.log
$ find ./tmp -exec ls -l {} \; total 56 -rwxrwxrwx 1 oracle dba 2 Apr 17 07:57 csc.log -rwxr-xr-x 1 oracle dba 297 Apr 17 08:53 m0 -rwxrwxrwx 1 oracle dba 26509 Mar 5 08:40 oralogs.txt -rwxrwxrwx 1 oracle dba 26509 Mar 5 08:40 ./tmp/oralogs.txt -rwxr-xr-x 1 oracle dba 297 Apr 17 08:53 ./tmp/m0 -rwxrwxrwx 1 oracle dba 2 Apr 17 07:57 ./tmp/csc.log
|
|
|
|