"find" is wrong or I am stupid?

"find" is wrong or I am stupid?

Post by Igor Chudov » Thu, 15 Jun 1995 04:00:00



Hi folks,

Here's the command that helps me find unused files on AIX:
/usr/bin/find /tmp -mtime 1 -print

Mysteriously, it does not work on my Linux system. It just prints nothing.
I tried atime, mtime, but it did not help.

find /tmp -print prints the data correctly. What to do?

Slackware 1.2.1, GNU find version 4.1 on both linux and aix.

Help!

Thank you,
--
        - Igor. (My opinions only)

            http://www.galstar.com/~ichudov/index.html <<----- CHANGED!!!

 
 
 

"find" is wrong or I am stupid?

Post by Lars Wirzeni » Sun, 18 Jun 1995 04:00:00


Quote:> IC> Here's the command that helps me find unused files on AIX:
> IC> /usr/bin/find /tmp -mtime 1 -print
> IC> Mysteriously, it does not work on my Linux system. It just prints nothing.

>      What does `-mtime 1' mean?

Last modified exactly 1 day ago.

Should be `-mtime +1', I think.

--

NEW: Publib version 0.5: ftp://ftp.cs.helsinki.fi/pub/Software/Local/Publib/

 
 
 

"find" is wrong or I am stupid?

Post by Paul D. Smi » Tue, 20 Jun 1995 04:00:00


%% Regarding "find" is wrong or I am stupid?;

    ic> /usr/bin/find /tmp -mtime 1 -print

    ic> Mysteriously, it does not work on my Linux system. It just
    ic> prints nothing.  I tried atime, mtime, but it did not help.

    ic> find /tmp -print prints the data correctly. What to do?

    ic> Slackware 1.2.1, GNU find version 4.1 on both linux and aix.

Hmm.  Are you sure you're using GNU find on the AIX?  That command
doesn't look right to me for GNU find.

In my experience, "-mtime 1" finds files that have been modified exactly
24 hours ago, which I presume is *not* what you want... you want files
that have been modified >24 hours ago, which would be "-mtime +1".

I rarely use plain numbers with the option in find: most always I want
+n or -n...

--
-------------------------------------------------------------------------------

 Senior Software Engineer                                   Bay Networks, Inc.
-----------------------------------------------==<http://www.baynetworks.com/>-
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
     These are my opinions--Bay Networks takes no responsibility for them.

 
 
 

"find" is wrong or I am stupid?

Post by Paul D. Smi » Tue, 20 Jun 1995 04:00:00


%% Regarding Re: "find" is wrong or I am stupid?;

    IC> /usr/bin/find /tmp -mtime 1 -print

    bh>      What does `-mtime 1' mean?

Why not try "man find" and see?

--
-------------------------------------------------------------------------------

 Senior Software Engineer                                   Bay Networks, Inc.
-----------------------------------------------==<http://www.baynetworks.com/>-
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
     These are my opinions--Bay Networks takes no responsibility for them.

 
 
 

"find" is wrong or I am stupid?

Post by Gordon M » Sun, 25 Jun 1995 04:00:00



: %% Regarding "find" is wrong or I am stupid?;

:     ic> /usr/bin/find /tmp -mtime 1 -print

:     ic> Mysteriously, it does not work on my Linux system. It just
:     ic> prints nothing.  I tried atime, mtime, but it did not help.

:     ic> find /tmp -print prints the data correctly. What to do?

:     ic> Slackware 1.2.1, GNU find version 4.1 on both linux and aix.

: Hmm.  Are you sure you're using GNU find on the AIX?  That command
: doesn't look right to me for GNU find.

AIX's find's -mtime means:

-mtime Number   Evaluates to the value True if the file has been modified
in Number-1 to Number multiples of 24 hours.

Linux's GNU find's -mtime means:

-mtime n        File's data was last modified n*24 hours ago.

--
Gordon Man

 
 
 

"find" is wrong or I am stupid?

Post by Thomas R. Stevenso » Tue, 27 Jun 1995 04:00:00




>: %% Regarding "find" is wrong or I am stupid?;

>:     ic> /usr/bin/find /tmp -mtime 1 -print

>:     ic> Mysteriously, it does not work on my Linux system. It just
>:     ic> prints nothing.  I tried atime, mtime, but it did not help.

>:     ic> find /tmp -print prints the data correctly. What to do?

>:     ic> Slackware 1.2.1, GNU find version 4.1 on both linux and aix.

>: Hmm.  Are you sure you're using GNU find on the AIX?  That command
>: doesn't look right to me for GNU find.

>AIX's find's -mtime means:

>-mtime Number   Evaluates to the value True if the file has been modified
>in Number-1 to Number multiples of 24 hours.

>Linux's GNU find's -mtime means:

>-mtime n    File's data was last modified n*24 hours ago.

>--
>Gordon Man


When it comes to any of the TIME options, you have three ways
to enter them. For example:

1) find /tmp -mtime 1 -print
2) find /tmp -mtime +1 -print
3) find /tmp -mtime -1 -print

In 1) Any file in /tmp that was modified exactly 24 hours ago will be
displayed.
In 2) Any file in /tmp that was modified greater than 24 hours ago will be
      displayed.
In 3) Any file in /tmp that was modified less than 24 hours ago will be
      displayed.

The problem might be that there were no files with a modifition date of
exactly 24 hours.
-



     /.  /\.  __/.   Home Page: http://tom.cc.wayne.edu                    

   For my PGP PUBLIC KEY BLOCK,

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."

 
 
 

1. strange output of "who am I" & "last" on solaris 9

OS:
%  uname -a
SunOS sunbox-1 5.9 Generic_117171-09 sun4u sparc SUNW,Ultra-2
ssh on Solaris 9 comes with the OS.

When I tried to "ssh" from another machine (Soalris 7 + OpenSSH)
to it, the output of "who am i" and "lst" is strange, the IP address
part is weird.

%  who am i
tom       pts/3        Oct  8 13:54    (t?)

%  last |more
tom   pts/3        t?             Fri Oct  8 13:54   still logged in

When I tried to ssh from another Solaris 9 (ssh comes with OS),
the IP address part is missing in the output of "who am i" and "last":
%  who am i
tom       pts/1        Oct  8 14:00

%  last |more
tom      pts/1                         Fri Oct  8 14:00   still logged in

Any idea?

Thanks.

2. CDROM bug in kernel 1.1.82 and higher

3. strange output of "who am i" & "last" in Solaris 9

4. xmotd 1.14 delayed

5. GETSERVBYNAME()????????????????????"""""""""""""

6. xinetd compile question

7. This clone thing...am I stupid, or am I right?

8. BIG bottom drives EIDE

9. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

10. Mac "find" performs far better than Unix O(n^2) "find"

11. STARTX: "No Screens Found"/"Can't find Display"

12. FPC Setup "Free Pascal Compiler, I am at wit's end"