LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 10-05-2009, 08:45 AM   #1
tucs_123
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Rep: Reputation: 15
Finding files modified n minutes ago


Hello friends,

Can you please help me with "find" command to list down the files modified/created say 10 minutes ago?

I tried below command on AIX but it didnt work.

>find / -mmin -10
>find: bad option -mmin


Also I don't want to display the message ": Permission denied" while displaying the files.

e.g.


>find / -mtime -1

output:

find: cannot chdir to </lost+found> : Permission denied
find: cannot chdir to </audit> : Permission denied

Any suggestion would be a great help!!
 
Old 10-05-2009, 09:00 AM   #2
wfh
Member
 
Registered: Sep 2009
Location: Northern California
Distribution: Ubuntu Debian CentOS RHEL Suse
Posts: 164

Rep: Reputation: 44
echo > mytest
find . -mmin -10

...that should show you 'mytest'
 
Old 10-06-2009, 07:50 AM   #3
tucs_123
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks friend for the reply,but the command is not working on AIX 5.2.

One more question,can anyone help me to display the result of find command with time of modification?

say,

>find / -mtime -1 -print 2>/dev/null

it should display list like below.

Oct 06 2009 ALEXTA
Oct 06 2009 MOBHTR

Generally the result is as below:

say,

>find / -mtime -1 -print 2>/dev/null

ALEXTA
MOBHTR
 
Old 10-06-2009, 07:59 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by tucs_123 View Post
Thanks friend for the reply,but the command is not working on AIX 5.2.
I works here (Linux). Start by reading through the man page on your system for "find". Perhaps the syntax is different......

Last edited by pixellany; 10-06-2009 at 08:01 AM.
 
Old 10-06-2009, 08:26 AM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
find / -mtime -1 -exec ls -l '{}' \; 2>/dev/null
 
Old 10-09-2009, 12:59 AM   #6
baznz
LQ Newbie
 
Registered: Oct 2005
Posts: 19

Rep: Reputation: 1
The problem with -exec is unless you do -type f you gonna traverse directories that match find criteria, which will then give you a list of its contents which may not match the criteria. So you going to get incorrect results.

find / -mtime -1 -ls 2> /dev/null

Last edited by baznz; 10-09-2009 at 01:19 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any other way of finding out if my file is just modified or is newly created deepti Linux - General 3 01-07-2009 10:35 PM
files modified ? sachin1361 Linux - Enterprise 1 03-13-2007 03:11 AM
gnu make recompiles the source files fully even though the files are not modified yasothamani Linux - Software 4 02-07-2007 06:36 AM
Find out if a file was modified in the last 2 minutes.... cricos Programming 5 04-06-2005 02:57 PM
bash scripting - how long ago file was modified brian0918 Programming 3 06-19-2003 04:10 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 10:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration