- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to list all changed/added files under file sys...
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
Discussions
Discussions
Forums
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
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
тАО06-14-2006 05:25 AM
тАО06-14-2006 05:25 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2006 05:30 AM
тАО06-14-2006 05:30 AM
Re: how to list all changed/added files under file systems?
Short of that, go to each file system and run:
cd /filesystema
find . -xdev -depth -mtime 0 -exec ls -al {} \; > /tmp/changed_file_list.log
If you want to do the whole server and are willing to wait...
cd /
find . -depth -mtime 0 -exec ls -al {} \; > /tmp/changed_file_list.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2006 05:33 AM
тАО06-14-2006 05:33 AM
Re: how to list all changed/added files under file systems?
If by "changed" you mean 'modified' do:
# find /path -xdev -mtime -1
This finds all files in /path that have been modified in the last 24-housrs where each increment equals 24-hours.
If you mean an "chage" in permissions, ownership or modification, use:
# find /path -xdev -ctime -1
The 'ctime' tracks changes in a file's inode.
See the manpages for 'find' for more information!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2006 05:34 AM
тАО06-14-2006 05:34 AM
Re: how to list all changed/added files under file systems?
0 = last 24 hours
1 = 24 to 48 hours ago
+1 = more than 48 hours ago
+0 = more than 24 hours ago
etc...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2006 06:28 AM
тАО06-14-2006 06:28 AM
Re: how to list all changed/added files under file systems?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2006 06:34 AM
тАО06-14-2006 06:34 AM
Re: how to list all changed/added files under file systems?
Rsync is a tool to sync two file systems together,
but ...
You "can" use rsync in a "dry-run" mode to see the files that need to change since the last rsync, IF that was 24 hours ago, AND the source machine that you're rsyncing from *hasn't* changed in the last 24 hours. It can get a little funny over file deletes though...
man rsync and look for the "dry-run" option...
"--dry-run" would be the command to merely review the changes that rsync would make.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2006 06:40 AM
тАО06-14-2006 06:40 AM
Re: how to list all changed/added files under file systems?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2006 06:41 AM
тАО06-14-2006 06:41 AM
Re: how to list all changed/added files under file systems?
You're original query suggested that all you wanted was to list files that have been changed or added during the last 24-hours.
The 'find' command used as I showed accomodates this quite easily. You can redirect your output to a file if you want!
Remote file synchronization/distribution is designed to tranfer from one server to another files that have been changed. You don't need that layer simply to see files modified/changed!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2006 08:04 AM
тАО06-14-2006 08:04 AM
Re: how to list all changed/added files under file systems?
find . -xdev -depth -mtime 0 -exec ls -al {} \; > /tmp/changed_file_list.log
# find /path -xdev -mtime -1 -exec ls -at {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2006 08:15 AM
тАО06-14-2006 08:15 AM
SolutionI'm sorry, I should have restricted things to *files* only:
# find /path -xdev -type f -mtime -1
# find /path -xdev -type f -ctime -1
Also, far kinder on your system's performance is the use of 'xargs' instead of '-exec':
# find /path -xdev -type f -mtime -1|xargs ls -l
...The above does the same thing as:
# find /path -xdev -type f -mtime -1 -exec ls -l {} \;
...but the 'xargs' filter bundles *multiple* filenames and runs then as "one" instatantiation of 'ls'.
Please see the 'xargs' manpages for more information.
Regards!
...JRF...