Re: Listing All Files In A Filesystem




On 5-Apr-2007, Rob Kendrick <nntp@xxxxxxxx> wrote:

On Thu, 05 Apr 2007 17:45:18 +0000, Michael Emerton wrote:

Yet Another enquiry! :@) You must be getting annoyed of me now! :@P


How would I list all files in the Filesystem?

having looked in the OS manuals, I could not find anything useful

One of the OS_GBPB reason codes allows you to enumerate a directory
iteratively. Use this recursively, starting from the root directory.

also how do I list all Filesystems available?

Tricky. There may be a SWI to enumerate these, I forget. But looping
over them shouldn't be too tricky as there aren't many "file system
numbers". The problem you have is that not all of these file systems are
sensible to show the use to select from. For example, it's unlikely that
the user has MP3s stored in PipeFS, DeviceFS or ResourceFS, so you'd have
to include a black list.

Actually it's not that difficult. You just need to scan all the filesystem
numbers (0 to 255) to find out which ones are 'active'. You can then
interrogate them and find out if they control drives, and which drives. If
they don't control drives they'd be of no interest since filesystems which
don't couldn't return meaningful data. Once you know the filesystem and it's
drives you can use OS_GBPB recursively from the root directory to get all
the files.

--
David Holden - APDL - <http://www.apdl.co.uk>
.



Relevant Pages

  • Re: delete big file doesnt free space on filesystem
    ... Could it be the file you deleted be another file system? ... /filesys/test are two file systems that have the same root directory. ... delete big file doesn't free space on filesystem ... correct freespace. ...
    (AIX-L)
  • Dumping the FileSystem in RAM
    ... The devices running on WinCE 3.x-4.x have the file system in RAM, ... mounted as root directory. ... And how to parse the filesystem? ...
    (microsoft.public.windowsce.embedded)
  • Re: Please HELP!! How to make a USB drive appear not working ?
    ... >>>filesystem type that indicates a filesystem not in wide use, ... >> VFAT partition. ... >> table as soon as it saw something that it recognized as a file system ... What writes an empty FAT and root directory? ...
    (comp.sys.ibm.pc.hardware.storage)
  • Re: Listing All Files In A Filesystem
    ... filesystem numbers to find out which ones are 'active'. ... You can then interrogate them and find out if they control drives, ... other file systems that you'd want access ...
    (comp.sys.acorn.programmer)
  • SUMMARY: how do I REALLY delete a file?
    ... leaving the rest of the file system intact. ... Wipedrive doesn't seem to be available for Solaris, but might be of interest to ... run this on each filesystem where the files from ... >Solaris' UFS] do not satisfy this assumption." ...
    (SunManagers)