* Re: OSF/1 Tools
1995-07-13 4:00 OSF/1 Tools Richard Hatherill Jr.
@ 1995-07-13 4:00 ` Dan Pop
1995-07-13 4:00 ` Brian Saunders
1 sibling, 0 replies; 10+ messages in thread
From: Dan Pop @ 1995-07-13 4:00 UTC (permalink / raw)
In <3u1nv1$b9c@ixnews2.ix.netcom.com> hatheril@ix.netcom.com (Richard Hatherill Jr. ) writes:
>Does anyone know of a tool that will show me the last accessed date of
>my OSF/1 files. I use ufs as well as advfs. HELP!
>
The name of the tool is "ls". Type "man ls" for details.
Dan
--
Dan Pop
CERN, CN Division
Email: Dan.Pop@mail.cern.ch
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: OSF/1 Tools
1995-07-13 4:00 ` Brian Saunders
1995-07-13 4:00 ` Peter Sherwood
@ 1995-07-13 4:00 ` Richard Hatherill Jr.
1995-07-13 4:00 ` Bassirou Bah
1995-07-13 4:00 ` Michael C. Grant
2 siblings, 1 reply; 10+ messages in thread
From: Richard Hatherill Jr. @ 1995-07-13 4:00 UTC (permalink / raw)
In <3u296o$hv2@news.doit.wisc.edu> saunders@io.che.wisc.edu (Brian
Saunders) writes:
>
>
>In article <3u1nv1$b9c@ixnews2.ix.netcom.com>, hatheril@ix.netcom.com
(Richard Hatherill Jr. ) writes:
>>Does anyone know of a tool that will show me the last accessed date
of
>>my OSF/1 files. I use ufs as well as advfs. HELP!
>
>I hate to be a jerk, but it is pretty sad when it becomes easier to
post a
>news article than to type "man ls" or "man find". Geesh, the ls
commands
>is one of the most basic - I'm sure you're familiar with it.
>
>ls -u gives you last access time, ls -l last modification time. Use
with
>the t and possibly r flags for sorting.
>
>--
>
>Brian Saunders saunders@castor.che.wisc.edu
>
Forgive me for being so stupid! The find and ls commands do not give
me what I need. I need a tool to give me a list of files not accessed
in the last 90 days. ls cannot do this and find with the atime option
does not work. Any other suggestions?
^ permalink raw reply [flat|nested] 10+ messages in thread
* OSF/1 Tools
@ 1995-07-13 4:00 Richard Hatherill Jr.
1995-07-13 4:00 ` Dan Pop
1995-07-13 4:00 ` Brian Saunders
0 siblings, 2 replies; 10+ messages in thread
From: Richard Hatherill Jr. @ 1995-07-13 4:00 UTC (permalink / raw)
Does anyone know of a tool that will show me the last accessed date of
my OSF/1 files. I use ufs as well as advfs. HELP!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: OSF/1 Tools
1995-07-13 4:00 OSF/1 Tools Richard Hatherill Jr.
1995-07-13 4:00 ` Dan Pop
@ 1995-07-13 4:00 ` Brian Saunders
1995-07-13 4:00 ` Peter Sherwood
` (2 more replies)
1 sibling, 3 replies; 10+ messages in thread
From: Brian Saunders @ 1995-07-13 4:00 UTC (permalink / raw)
In article <3u1nv1$b9c@ixnews2.ix.netcom.com>, hatheril@ix.netcom.com (Richard Hatherill Jr. ) writes:
>Does anyone know of a tool that will show me the last accessed date of
>my OSF/1 files. I use ufs as well as advfs. HELP!
I hate to be a jerk, but it is pretty sad when it becomes easier to post a
news article than to type "man ls" or "man find". Geesh, the ls commands
is one of the most basic - I'm sure you're familiar with it.
ls -u gives you last access time, ls -l last modification time. Use with
the t and possibly r flags for sorting.
--
Brian Saunders saunders@castor.che.wisc.edu
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: OSF/1 Tools
1995-07-13 4:00 ` Brian Saunders
1995-07-13 4:00 ` Peter Sherwood
1995-07-13 4:00 ` Richard Hatherill Jr.
@ 1995-07-13 4:00 ` Michael C. Grant
1995-07-14 4:00 ` Mark Bartelt
2 siblings, 1 reply; 10+ messages in thread
From: Michael C. Grant @ 1995-07-13 4:00 UTC (permalink / raw)
In article <3u35eo$s5o@ixnews6.ix.netcom.com>
hatheril@ix.netcom.com (Richard Hatherill Jr. ) writes:
Forgive me for being so stupid! The find and ls commands do not give
me what I need. I need a tool to give me a list of files not accessed
in the last 90 days. ls cannot do this and find with the atime option
does not work. Any other suggestions?
Well, this should work OK:
find . \! -atime -90
You might also want to exclude directories:
find . \! -type d \! -atime -90
--
Michael C. Grant Information Systems Laboratory, Stanford University
mcgrant@isl.stanford.edu <A HREF="http://www-isl.stanford.edu/~mcgrant">
------------------------------------------------------------------------------
"When you get right down to it, your "Long hair, short hair---what's
average pervert is really quite the difference once the head's
thoughtful." (David Letterman) blowed off?" (Nat'l Lampoon)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: OSF/1 Tools
1995-07-13 4:00 ` Brian Saunders
@ 1995-07-13 4:00 ` Peter Sherwood
1995-07-13 4:00 ` Bassirou Bah
1995-07-14 4:00 ` Dan Pop
1995-07-13 4:00 ` Richard Hatherill Jr.
1995-07-13 4:00 ` Michael C. Grant
2 siblings, 2 replies; 10+ messages in thread
From: Peter Sherwood @ 1995-07-13 4:00 UTC (permalink / raw)
Brian Saunders (saunders@io.che.wisc.edu) wrote:
: I hate to be a jerk, but it is pretty sad when it becomes easier to post a
: news article than to type "man ls" or "man find".
It isn't at all obvious that 'ls' will give the information the poster
wanted. Of course, people who have pored over the ls man page trying to
figure out how to make ls work know. So I don't think the original
question was stupid or lazy at all. If you didn't know anything about
Unix, how would you find out how to get the last modified date of a file?
-----------------------------------------------------------------------------
Peter Sherwood
(617) 332-8880 (voice)
(617) 969-2101 (fax)
gbcacm@ccs.neu.edu
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: OSF/1 Tools
1995-07-13 4:00 ` Richard Hatherill Jr.
@ 1995-07-13 4:00 ` Bassirou Bah
0 siblings, 0 replies; 10+ messages in thread
From: Bassirou Bah @ 1995-07-13 4:00 UTC (permalink / raw)
If you want a flexible tool, you can write one. This is what makes UNIX
fantastic. Use the chdir() function to go to all your directories or
use find to get all your files in your file system. Use this file list
as entry to a progam to check the stat of each file.
Using stat() function you should be able to have access to the time it was
changed, accessed etc. You should be able to discriminate as much as you want.
Compare them to anytime u want to a produce whatever. The program should not
take more than 1 hour to write.
I hope this helps!
Regards!
Bassirou Bah
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: OSF/1 Tools
1995-07-13 4:00 ` Peter Sherwood
@ 1995-07-13 4:00 ` Bassirou Bah
1995-07-14 4:00 ` Dan Pop
1 sibling, 0 replies; 10+ messages in thread
From: Bassirou Bah @ 1995-07-13 4:00 UTC (permalink / raw)
I may have sent a reply to another guy who has not requested how to
access the latest accessed file.
When find and ls cannot give what you need, write your own utility.
Scanning the file system you should be able by using stat() funtion
to access all the information about each file. Compare it to what ever
you need and produce any output. It is your system, it Unix, it flexible.
It should take 1 hour to write.
There is no such thing as a stupid question! Don't feel sorry!
Good luck.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: OSF/1 Tools
1995-07-13 4:00 ` Michael C. Grant
@ 1995-07-14 4:00 ` Mark Bartelt
0 siblings, 0 replies; 10+ messages in thread
From: Mark Bartelt @ 1995-07-14 4:00 UTC (permalink / raw)
Rule #1: Questions should always be phrased as precisely and unambiguously
as possible ...
[ Richard Hatherill Jr. ]
| Does anyone know of a tool that will show me the last accessed date of
| my OSF/1 files.
[ Brian Saunders ]
| ls -u gives you last access time, ls -l last modification time. Use with
| the t and possibly r flags for sorting.
[ Richard Hatherill Jr. ]
| The find and ls commands do not give
| me what I need. I need a tool to give me a list of files not accessed
| in the last 90 days. ls cannot do this and find with the atime option
| does not work.
Note that Brian's response *did* answer the original question, as posted.
The "ls -u" command does show access times, which is what was asked for.
After the followup question clarified what was *really* wanted, one reply
suggested ...
[ Michael C. Grant ]
| Well, this should work OK:
|
| find . \! -atime -90
|
| You might also want to exclude directories:
|
| find . \! -type d \! -atime -90
Rule #2: Examples are usually best understood if presented in simplest
form. Here, for instance, we could just as easily say
find . -atime +90
or
find . -type f -atime +90
Note that if you want to actually see what the access times are, you'd
need to do something like
find . -atime +90 -exec ls -lud {} \;
or
find . -type f -atime +90 -exec ls -lu {} \;
Mark Bartelt 416/978-5619
Canadian Institute for mark@cita.toronto.edu
Theoretical Astrophysics mark@cita.utoronto.ca
"Nur eine Waffel taugt!" -- Parsifal, in an Eggo commercial
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: OSF/1 Tools
1995-07-13 4:00 ` Peter Sherwood
1995-07-13 4:00 ` Bassirou Bah
@ 1995-07-14 4:00 ` Dan Pop
1 sibling, 0 replies; 10+ messages in thread
From: Dan Pop @ 1995-07-14 4:00 UTC (permalink / raw)
In <3u3m2p$bdd@camelot.ccs.neu.edu> gbcacm@ccs.neu.edu (Peter Sherwood) writes:
>Brian Saunders (saunders@io.che.wisc.edu) wrote:
>: I hate to be a jerk, but it is pretty sad when it becomes easier to post a
>: news article than to type "man ls" or "man find".
>
>It isn't at all obvious that 'ls' will give the information the poster
>wanted.
It is, however, obvious that "ls" is the first thing to try. And anybody
who spent more than a few minutes in front of a Unix box knows about the
"man" command. "ls" has a well established "reputation" for its huge
number of options. Using "man ls" to see whether one of them does what
you need is the most rational approach to the problem even for an
inexperienced user.
>Of course, people who have pored over the ls man page trying to
>figure out how to make ls work know. So I don't think the original
>question was stupid or lazy at all. If you didn't know anything about
>Unix, how would you find out how to get the last modified date of a file?
If I didn't know anything about Unix, I'd consider reading a book on this
subject _before_ starting to ask any questions. This is precisely what
I did, 3 years ago, when I didn't know anything about Unix. It worked
for me pretty well.
Dan
--
Dan Pop
CERN, CN Division
Email: Dan.Pop@mail.cern.ch
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~1995-07-14 4:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-07-13 4:00 OSF/1 Tools Richard Hatherill Jr.
1995-07-13 4:00 ` Dan Pop
1995-07-13 4:00 ` Brian Saunders
1995-07-13 4:00 ` Peter Sherwood
1995-07-13 4:00 ` Bassirou Bah
1995-07-14 4:00 ` Dan Pop
1995-07-13 4:00 ` Richard Hatherill Jr.
1995-07-13 4:00 ` Bassirou Bah
1995-07-13 4:00 ` Michael C. Grant
1995-07-14 4:00 ` Mark Bartelt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox