"bare" format for ls listing
Hi *,
I think they had a DOS command to just print out a directory listing in
'bare' format "dir /B" or something like that.
While using ls in Unix/Linux. You get something like:
// - - - - - - - - - - - - - - - - - - - - - - - - - -
sh-3.00# pwd
/home/knoppix
sh-3.00# ls -l
total 0
drwxr-xr-x 2 knoppix knoppix 160 Sep 19 23:43 Desktop
drwxr-xr-x 2 knoppix knoppix 40 Apr 19 2004 tmp
sh-3.00# ls -Rl
..:
total 0
drwxr-xr-x 2 knoppix knoppix 160 Sep 19 23:43 Desktop
drwxr-xr-x 2 knoppix knoppix 40 Apr 19 2004 tmp
../Desktop:
total 24
-rw-r--r-- 1 knoppix knoppix 1014 Sep 19 23:50 CD-ROM [cdrom1]
-rw-r--r-- 1 knoppix knoppix 1000 Sep 19 23:50 CD-ROM [cdrom]
-rw-r--r-- 1 knoppix knoppix 686 Mar 31 2003 Floppy
-rw-r--r-- 2 knoppix knoppix 189 Sep 19 23:42 KNOPPIX.desktop
-rw-r--r-- 1 knoppix knoppix 4801 Sep 19 23:43 trash.desktop
../tmp:
total 0
sh-3.00#
// - - - - - - - - - - - - - - - - - - - - - - - - - -
How could you get something like this:
sh-3.00# ls (?)
drwxr-xr-x 2 knoppix knoppix 160 Sep 19 23:43 /home/knoppix/Desktop
drwxr-xr-x 2 knoppix knoppix 40 Apr 19 2004 /home/knoppix/tmp
-rw-r--r-- 1 knoppix knoppix 1014 Sep 19 23:50 /home/knoppix/Desktop/CD-ROM
[cdrom1]
-rw-r--r-- 1 knoppix knoppix 1000 Sep 19 23:50 /home/knoppix/Desktop/CD-ROM
[cdrom]
-rw-r--r-- 1 knoppix knoppix 686 Mar 31 2003 /home/knoppix/Desktop/Floppy
-rw-r--r-- 2 knoppix knoppix 189 Sep 19
23:42 /home/knoppix/Desktop/KNOPPIX.desktop
-rw-r--r-- 1 knoppix knoppix 4801 Sep 19
23:43 /home/knoppix/Desktop/trash.desktop
or just
/home/knoppix/Desktop
/home/knoppix/tmp
/home/knoppix/Desktop/CD-ROM [cdrom1]
/home/knoppix/Desktop/CD-ROM [cdrom]
/home/knoppix/Desktop/Floppy
/home/knoppix/Desktop/KNOPPIX.desktop
/home/knoppix/Desktop/trash.desktop
Notice that you would get the fully qualified file names.
I need to get to all reachable files for a given user (all existing files
for root, e.g.) in a file and then process this file (with the
saved'/redirected output) in stead of going through the directory hierarchy
and get this info for each file.
All this info is in the fs right? What is the most efficiet way to get if
from there?
Thanks
|