- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- inode timestamp
Operating System - HP-UX
1824809
Members
4185
Online
109674
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
Forums
Discussions
юдл
back
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
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-06-2005 10:02 AM
тАО06-06-2005 10:02 AM
inode timestamp
Hi,
I have a script that run everyday to reset files/directory permission to comply with our company information protection (IP) standard. The script use "chmod" as well as "find" command reset file permission. Regardless of what is the current file permission the script will attemp to reset them.
For example, the script will set "lsnrctl" file to 750 eventhough the current permission is 750.
Recently we are implementing legato incremental backup. The backup look for inode timestamp to check for changes. Unfornately "chmod" does change the inode timestamp. As a result the incremental backup become full backup due to inode timestamp got change by my IP script.
I am trying to be selective by changing only files that do not compile with IP standard using the following command. Unfortunately this commmad still change inode timestamp.
find /oracle -perm -o-w -exec chmod o-w {} \;
What command should I use perform the above task.
Any hepls is greatly appreciate.
Thanks.
I have a script that run everyday to reset files/directory permission to comply with our company information protection (IP) standard. The script use "chmod" as well as "find" command reset file permission. Regardless of what is the current file permission the script will attemp to reset them.
For example, the script will set "lsnrctl" file to 750 eventhough the current permission is 750.
Recently we are implementing legato incremental backup. The backup look for inode timestamp to check for changes. Unfornately "chmod" does change the inode timestamp. As a result the incremental backup become full backup due to inode timestamp got change by my IP script.
I am trying to be selective by changing only files that do not compile with IP standard using the following command. Unfortunately this commmad still change inode timestamp.
find /oracle -perm -o-w -exec chmod o-w {} \;
What command should I use perform the above task.
Any hepls is greatly appreciate.
Thanks.
quest for perfections
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2005 10:45 AM
тАО06-06-2005 10:45 AM
Re: inode timestamp
There are 3 timestamps stored in each inode: 1) access time 2) modification time -- last time the CONTENTS of the file were changed 3) change time -- last time the mode, group, and/or ownership was changed. By definition, the chmod command changes the change time.
What you have to do is capture the ctime BEFORE the chmod and then restore it afterwards.
# filefixer.sh
INFILE=${1}
TDIR=${TMPDIR:-/var/tmp}
PID=${$}
REF_FILE=${TDIR}/X${PID}
touch -r ${INFILE} ${REF_FILE} # save the metadata
chmod 750 ${INFILE}
touch -c -r ${REF_FILE} ${INFILE} # restore the metadata
rm -f ${REF_FILE}
your -exec now becomes -exec filefixer.sh {} \;
This is untested but it should work. I would do this in Perl using the File::Find and stat functions.
What you have to do is capture the ctime BEFORE the chmod and then restore it afterwards.
# filefixer.sh
INFILE=${1}
TDIR=${TMPDIR:-/var/tmp}
PID=${$}
REF_FILE=${TDIR}/X${PID}
touch -r ${INFILE} ${REF_FILE} # save the metadata
chmod 750 ${INFILE}
touch -c -r ${REF_FILE} ${INFILE} # restore the metadata
rm -f ${REF_FILE}
your -exec now becomes -exec filefixer.sh {} \;
This is untested but it should work. I would do this in Perl using the File::Find and stat functions.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2005 12:24 PM
тАО06-06-2005 12:24 PM
Re: inode timestamp
Thanks.
quest for perfections
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP