LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-16-2012, 02:11 AM   #1
purupatil
LQ Newbie
 
Registered: May 2012
Posts: 3

Rep: Reputation: Disabled
find command on linux


Hello,

I have the find command to list the files on some path. the same command give different list of files on two different servers.

The servers have different time zones.

Can I handle this case somehow to to get same files?

Thanks in advance..!
 
Old 05-16-2012, 02:31 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
you need to provide more useful information than this. Find will return the files it finds... if there are different files, there will be different output..?
 
Old 05-16-2012, 03:05 AM   #3
purupatil
LQ Newbie
 
Registered: May 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Yes, files are diffrent. What I want is it should list the files on some date. like if I give find command like this

find DIRPATH -type f -mtime -6 -mtime +5 -exec ls -lrt {} \;

It would list the files on 10 of may one one server and 11 may on other server.
 
Old 05-16-2012, 03:49 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
well mtime is the age of the file in terms of 24 hour periods from the current time, so naturally there will be a point in different timezones where that can give a different date. Check the -daystart option to use the start of the day within the timezone.
 
Old 05-16-2012, 05:31 AM   #5
purupatil
LQ Newbie
 
Registered: May 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
can you give me an example on -daystart?

Is there any other way to list the files on some particular date?

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Command to find distribution of Linux prakasha.lunux Linux - Newbie 7 01-21-2011 03:08 AM
How to find the core files in linux with out using "Find" command? shaktiman Linux - Newbie 11 08-02-2010 10:46 AM
How to find the core files in linux with out using "Find" command? shaktiman Programming 1 07-30-2010 11:31 AM
Command to find the flavor of linux s_deepak_123 Linux - General 3 02-16-2006 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:21 AM.

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