Article View: comp.unix.shell
Article #1712finding the filesystem of a file
From: Dave Taylor {guest}
Date: Mon, 05 Nov 1990 16:43
Date: Mon, 05 Nov 1990 16:43
23 lines
1516 bytes
1516 bytes
Curious to know if anyone can tell me the fastest way to find out which
filesystem a given file is on if the entire pathname is given. I have only
5 filesystems but I'm stumped as to on how to make sure that I always match
the file with the appropriate filesystem. i.e. if the files are /u/foo/bar/new
and maybe /u/foobar/new AND the filesystems are /u, /u/foo, and /u/foo/bar.
for the file /u/foo/bar/new, the output should be "/u/foo/bar"
for the file /u/foobar/new, the output should be "/u"
The reason for this is because I backup several filesystems on one tape and I
need to know which filesystem to look in as I search through my log files.
Thanks in advance for all your help.
--david
--
------- -------
David E. Taylor, OMSS UNIX Development // Operation Mobilization USA
AT&T: (404) 631-0432 +====+ UUCP: {decvax, sun!sunatl, gatech}!emory!om!dt
FAX: (404) 631-0439 +====+ Internet: dt%om.uucp@mathcs.emory.edu
Technical Details
Message-ID:
<6495@emory.mathcs.emory.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!wuarchive!emory!dtShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!wuarchive!emory!dt
From: dt@mathcs.emory.edu (Dave Taylor {guest})
Newsgroups: comp.unix.shell
Subject: finding the filesystem of a file
Summary: How do I find out which filesystem a certain file in on?
Keywords: filesystem search find file
Message-ID: <6495@emory.mathcs.emory.edu>
Date: 5 Nov 90 16:43:14 GMT
Distribution: usa
Organization: Emory University, Dept of Math and CS
Lines: 23