08-15-2019
You didn't say which operating system this is but there has to be difference between read and open. If you think about it, if a read updated the access time then all the access times would change when a backup is run which wouldn't be any good if you had to restore the whole lot. However, if an application opens a file then that will update the access time. For example, if you open a file with vi and then immediately quit with :q!, the access time should update because the file has been specifically opened. Additionally, if youvi followed by :w! (even if you haven't changed anything) the file will be written back so the modified date should change.
Now with a directory it is holding the details of its files so if a new file is created the directory is modified. Also, if an application specifically opens a file with that directory in its pathname (and blocks may need to be allocated/deallocated to the file), then the access time should change.
You should be able to verify this on your operating system with a few tests.
Last edited by hicksd8; 08-16-2019 at 05:20 AM..
These 2 Users Gave Thanks to hicksd8 For This Post:
8 More Discussions You Might Find Interesting
1. Solaris
Hi all,
can some one help me in chmod command, and let me know the various combinations for this command.
for : eg chmod -R 777 <dir names>
this gives all rights to all but i want the specific access levels kindly help me out in this issue.
Thank you,
lakshmanan (2 Replies)
Discussion started by: lakshmananl
2 Replies
2. Linux
If i want to display a banner that says Happy Bday, but I want to put that output banner into a file called bday4me,
could I use the command (echo) or (banner -w35) Happy Bday >> bday4me
would this command work? Sorry for asking, but i'm at home just now and don't have access to a UNIX... (3 Replies)
Discussion started by: Cisco
3 Replies
3. Shell Programming and Scripting
Hi all,
Can you tell me how to change the prompt color (only the path part) when I chnange directory with "cd"?
I use the sequence below in ".bashrc" (Solaris 8) to change my prompt colors and I'd like to modify it to change the path color when I cange directory.
PSC() { echo -ne "\"; }... (0 Replies)
Discussion started by: majormark
0 Replies
4. Shell Programming and Scripting
Hi.,
Last modified time of the folder is changing when I view the file inside the directory. Here is the test on sample directory. I believe that ls -l commands gives the time detail w.r.t last modified time. Pl. suggest.
bash-3.2$ mkdir test
bash-3.2$ cd test
bash-3.2$ touch myfile.txt... (2 Replies)
Discussion started by: IND123
2 Replies
5. UNIX for Dummies Questions & Answers
Hey All,
I want to get the access time of files in a directory.
I used ls -lu on a directory and picked a file that had the access time of Mar 1 and used cat to get the contents of the file. Then I used the ls -lu again and the access time changed on that file. Perfect !!
Now if I cat a... (10 Replies)
Discussion started by: vipulgupta0
10 Replies
6. Shell Programming and Scripting
This piece of code is in a shell script I'm trying to modify to run on my system.
sed s:nu\\t.\*:"nu=0"
It's clearly a substitute script which replaces nu\\t.\* with nu = 0.
What exactly does nu\\t.\* demarcate though-- I thought it was just the previous nu = xxxxx (which existed and is... (3 Replies)
Discussion started by: czar21
3 Replies
7. Shell Programming and Scripting
I am trying to do the following task :
export ENV=aaa
export ENV_PATH=$(cd /apps | ls | grep $ENV)
However, it's not working. What's the way to change to directory and search some file in that directory in single command
Please help. (2 Replies)
Discussion started by: saurau
2 Replies
8. Shell Programming and Scripting
When I run the below bash I get the expected output, which is the sum of all matching targets less than 20 in $file1. The filename in the directory is fixed (in bold).
for file1 in /home/cmccabe/Desktop/test/panel/reads/16-0000_EPIL70.txt ; do
bname=`basename $file1`
... (3 Replies)
Discussion started by: cmccabe
3 Replies
backup(1M) backup(1M)
NAME
backup - backup or archive file system
SYNOPSIS
[-archive]
DESCRIPTION
The command uses find(1) and cpio(1) to save a archive of all files that have been modified since the modification time of on the default
tape drive should be invoked periodically to ensure adequate file backup.
The option suppresses warning messages regarding optional access control list entries. backup(1M) does not backup optional access control
list entries in a file's access control list (see acl(5)). Normally, a warning message is printed for each file having optional access
control list entries.
The option causes backup to save all files, regardless of their modification date, and then update using touch(1).
prompts you to mount a new tape and continue if there is no more room on the current tape. Note that this prompting does not occur if you
are running from cron(1M).
The option causes to start a file system consistency check (without correction) after the backup is complete. For correct results, it is
important that the system be effectively single-user while is running, especially if is allowed to automatically fix whatever inconsisten-
cies it finds. does not ensure that the system is single-user.
You can edit to customize it for your system. Several local values are used that can be customized:
specifies which directories to back up recursively (usually
meaning all directories);
file name where start and finish times, block counts, and error messages
are logged;
file name whose date is the date of the last archive;
file name that is checked by
to remind the next person who logs in to change the backup tape;
file name where start and finish times and
output is logged.
You may want to make other changes, such as whether or not does automatic correction (according to its arguments), where output is
directed, other information logging, etc.
In all cases, the output from is a normal archive file (or volume) which can be read using with the option.
File Recovery
creates archive tapes with all files and directories specified relative to the root directory. When recovering files from an archive tape
created by you should be in the root directory and specify the directory path names for recovered files relative to the root directory When
specifying the directory path name for file recovery by do not precede the leading directory name with a slash. If you prefer, you can
also use with a option to determine how files and directories are named on the archive tape before attempting recovery.
WARNINGS
Refer to in cpio(1).
When runs out of tape, it sends an error to standard error and demands a new special file name from
To continue, rewind the tape, mount the new tape, type the name of the new special file at the system console, and press
If is being run unattended from cron(1M) and the tape runs out, terminates, leaving the process still waiting. Kill this process when you
return.
FILES
parameterized file names
SEE ALSO
cpio(1), find(1), touch(1), cron(1M), fbackup(1M), frecover(1M), fsck(1M), acl(5).
backup(1M)