11-26-2010
Last modified time of the folder is changing when I view the file inside the directory
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.
HTML Code:
bash-3.2$ mkdir test
bash-3.2$ cd test
bash-3.2$ touch myfile.txt
bash-3.2$ ls -l
total 0
-rw-r--r-- 1 avv avvgrp 0 Nov 26 03:51 myfile.txt
bash-3.2$ cd ..
bash-3.2$ ls -l test/
total 0
-rw-r--r-- 1 avv avvgrp 0 Nov 26 03:51 myfile.txt
bash-3.2$ ls -lrt | tail -1
drwxr-xr-x 2 avv avvgrp 4096 Nov 26 03:51 test
bash-3.2$ vi test/myfile.txt
q! ---- here I have not modified the file. And executed quit without saving command.
bash-3.2$ ls -lrt | tail -1
drwxr-xr-x 2 avv avvgrp 4096 Nov 26 03:53 test
Timestamp of the folder has changed after I viewed the file, as indicated above. Pl. suggest.
Thanks.,
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have some log files created in the following fashion
Ex:
file name modified date
1) s.log1 01-jan-08
2) s.log2 02-jan-08
3) s.log3 03-jan-08
4) s.log4 04-jan-08
Now I want to have the latest 2 logs and delete the others.
Can you tell me the one liner /... (1 Reply)
Discussion started by: ammu
1 Replies
2. Shell Programming and Scripting
How to change the modified time of a file to any specified time.
ls -ltr
drwxr-xr-x 2 pipe pipe 4096 Jun 10 10:33 coredump_06062008
----------------------------------------------------------------------
here file coredump_06062008 last modified time is Jun 10 10:33 and i... (1 Reply)
Discussion started by: ali560045
1 Replies
3. UNIX for Advanced & Expert Users
how to directly open a last modified file in a directory? Please help (5 Replies)
Discussion started by: apsprabhu
5 Replies
4. Shell Programming and Scripting
Hi All,
I need a small help in formating a file.
I have a file with word like this;
ATGHYJIKOLFHJDHDGDYFGFYGRYGFYRHFYHFUED
DHDJFDFSJFLFJSKJFSLKJFGHDKLGLDKGLKDNVNV
VNLDVLDVDHFJDKDJVNVHSUFNHJFMVJFMVKJMFV
...
....
....like this 75000 words.
I want to convert this words into a single... (5 Replies)
Discussion started by: Lucky Ali
5 Replies
5. Shell Programming and Scripting
Hi,
I have modified one file today. So if i give `ls -lrt filename` command it will show the current modified time.
But i wanted to know what is the previous modified time for this file
Is there any way to find this
Thanks,
Puni (3 Replies)
Discussion started by: puni
3 Replies
6. UNIX for Advanced & Expert Users
Hi,
I am new bie to Unix. Might be a simple question I am asking.
I want to find the last modified time of a file and find the difference between the currrent time and the last modified time. Appreciate, if someone can throw some light on what commands can be used.
Cheers,
James (2 Replies)
Discussion started by: JamesJoe
2 Replies
7. Shell Programming and Scripting
i have a requirement where i needed to change variable values in a properties file(first file) whenever there is change to Release details file(second file). My question is do i have to create a daemon process that always checks the modified time/inode change of the second file and then change the... (1 Reply)
Discussion started by: saikiran_1984
1 Replies
8. Shell Programming and Scripting
A files last modified time is like 03/02/2012 xx:xx:xx
So what would be the command to convert the last modified in the given signature
Thanks for giving time and replying..:) (2 Replies)
Discussion started by: ezee
2 Replies
9. UNIX for Beginners Questions & Answers
Hello... And thanks in advance for any help anyone can offer me
I was trying to work out the differences between displaying modify, access, and change times with the 'ls' command. Everything seems in order when I look at files, but the access time on a directory doesn't seem to change when I... (4 Replies)
Discussion started by: bodisha
4 Replies
rmf(1mh) rmf(1mh)
Name
rmf - remove folder
Syntax
rmf [ +folder ] [ -help ] [ -[no]interactive ]
Description
The command removes all of the messages within the current folder, and then removes the folder itself. If there are any files within the
folder which are not part of MH, they are not removed, and an error message is displayed.
You can specify a folder other than the current folder by using the +folder argument. If you do not specify a folder, and cannot find the
current folder, asks you whether you want to delete instead.
If the current folder is removed, it makes current.
Note that the command irreversibly deletes messages that do not have other links, so use it with caution.
If the folder being removed is a sub-folder, the parent folder becomes the new current folder, and tells you that this has happened. This
provides an easy mechanism for selecting a set of messages, operating on the list, then removing the list and returning to the current
folder from which the list was extracted.
Using to delete a read-only folder deletes the private sequence and current message information from the file, without affecting the folder
itself. If you have sub-folders within a folder, you must delete all the sub-folders before you can delete the folder itself.
Options
-help Prints a list of the valid options to this command.
-interactive
-nointeractive
Asks for confirmation before deleting a folder. By default, deletes a folder and its messages without asking for confirmation.
If you specify the -interactive option, asks if you are sure before deleting the folder. You are advised to use this option,
since when deletes a folder its contents are lost irretrievably.
Examples
This example shows how asks for confirmation when the -interactive option is used:
% rmf -interactive +test
Remove folder "test"? y
Profile Components
Path: To determine the user's Mail directory
Files
The user profile.
See Also
rmm(1mh)
rmf(1mh)