- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: command to find the directory modification dat...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 07:47 AM
05-31-2007 07:47 AM
can someone tell me what is the best command to use to get the list of the directories that are not modified from the last 30 days?
HP-UX--11.23
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 07:53 AM
05-31-2007 07:53 AM
Re: command to find the directory modification date
# find /path -type d -mtime +30
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 07:55 AM
05-31-2007 07:55 AM
Re: command to find the directory modification date
find / -type d -mtime +30
However this may be a question of you not meaning precisely what you are saying; it depends upon whether you mean has the directory been modified in the last 30 days or have the contents of the directory been modified in the last 30 days. It also might depend upon do you mean "changed" or "modified" in UNIX-speak. Those are synonyms in English but not in UNIX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 08:06 AM
05-31-2007 08:06 AM
Re: command to find the directory modification date
for ex:
./2007-04-23-------I only need this
./2007-04-23/dladb07
./2007-04-23/dladb07/00-00
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 08:12 AM
05-31-2007 08:12 AM
Re: command to find the directory modification date
# find /tmp -type d -mtime +30 -path "/tmp/*"
# cd /path
# find . -type d -mtime +30 -path "./*"
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 09:12 AM
05-31-2007 09:12 AM
Re: command to find the directory modification date
The path is not working. I do not get anything if I type
cd /home/raji
find ./ -type d -path /home/raji
or
find ./ -type d -path "/home/raji/*"
(i expect just /home/raji/temp)
if I type
find ./ -type -d
i get
/home/raji/temp
/home/raji/temp/test1
/home/raji/temp/test/test1
I checked man pages did not see any syntax problem in my command.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 09:19 AM
05-31-2007 09:19 AM
Re: command to find the directory modification date
>cd /home/raji
>find ./ -type d -path /home/raji
>or
>find ./ -type d -path "/home/raji/*"
That's because the path args are missing the leading period whereas your search path is "./" i.e. period followed by slash. Change your find stmt to...
find ./ -type d -path "./home/raji/*"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 09:26 AM
05-31-2007 09:26 AM
Re: command to find the directory modification date
find ./ -type d -path /home/raji
Note that you are specifying a relative path as your starting directory but specifying an absolute path as your -path pattern.
find . -type d -mtime +30 ! -path './*/*'
should find only the 1st level directories under the CWD that have not been modified in 30 days.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 09:28 AM
05-31-2007 09:28 AM
Re: command to find the directory modification date
# cd /home/raji
# find ./ -type d -path "./*"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 09:34 AM
05-31-2007 09:34 AM
Re: command to find the directory modification date
Oops, sorry, I should have written something like:
# cd /tmp && find . -type d -mtime +30 ! -path "./*/*"
...to find on the directories under '/tmp' that have not been modified in the last 30-days. If you wanted those modified *during* the last 30-days, change +30 to -30.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2007 08:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2007 01:23 AM
06-01-2007 01:23 AM
Re: command to find the directory modification date
It worked
find with -prune.
Thanks to all of you!!