mv command and file-timestamps


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users mv command and file-timestamps
# 1  
Old 07-04-2006
mv command and file-timestamps

Hi all,

I need help to find out if it is possible (if so, how? Smilie ) to move a hard link to a given file without making the main file i-node modification time change.


That is:
I have a file myFile.txt ,
and I have a link myLink.dat to that file (obtained by: ln myFile.txt myLink.dat).
I have to move the link: mv myLink.dat ../ without changing the modification time of the i-node for the file "myFile.txt".

Is it possible? Smilie

Many thanks!! Smilie

Gian
# 2  
Old 07-04-2006
I don't think that the modification time for the inode should change when you move a file. It is only the directory inode timestamps that should change.

Guys, please correct me if I'm wrong.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find file between timestamps Query

On my linux box, I have a file say dump.txt. I then need to move to another seperte folder and need to find only one file with extension *.tar that has the closest timestamp after / next to the timestamp of the dump.txt. (2 Replies)
Discussion started by: mohtashims
2 Replies

2. Shell Programming and Scripting

Search lines between two timestamps in a file

Hi, I want to pull lines between two timestamps from a file. When I just insert values directly it is working fine. sed -n '/2014-02-14 05:30/,/2014-02-14 05:31/p' Logfile When I try to insert variable it is not working. sed -n '/TZ=GMT+1 date +%Y-%m-%d" "%H:%M:%S/,/TZ=GMT date... (2 Replies)
Discussion started by: Neethu
2 Replies

3. Shell Programming and Scripting

To search lines between two timestamps in a file

I have a log file where every line starts with a time stamp. I have to extract lines from the file within a given time stamp. For example: IF the file is like this: 2012-08-19 10:34:03,446|WebContainer : 56|OrderHeaderDaoImpl|findByKeys|26| 2012-08-20 11:34:03,463|WebContainer :... (8 Replies)
Discussion started by: abhinalluri
8 Replies

4. Shell Programming and Scripting

[Shell/Perl(?)] Prepending timestamps to console output & writing results to a file

I do a lot of TSM work and I embarked on what I thought would be an easy task, and I'd be very happy for any input to save the pounding my keyboard is receiving :] By default, the output of TSM's console has no timestamping, making it hard to sort through accurately. This puts my console into... (5 Replies)
Discussion started by: Vryali
5 Replies

5. Shell Programming and Scripting

How to fetch data between two timestamps in a file using KSH

Hi, I got a requirement to fetch data between two time stamps in a big log file and grep for a word in that particular time interval of data. Here is my log looks like: 2012/04/08-14:35:56 Abcdefg 2012/04/08-14:35:56 Hijklmnophhoishfw 2012/04/08-14:35:56... (1 Reply)
Discussion started by: siri_886
1 Replies

6. Shell Programming and Scripting

HOWTO - File Timestamps - how old is a file?

Hi all, Can anyone please advise how to get/display the timestamp of a file and at the same time display how old the file is? For example, if I have a file that is created on January 01, 2011 at 1000 and today is January 03, 2011 2200, I want a script to be able to display the timestamp... (2 Replies)
Discussion started by: newbie_01
2 Replies

7. Shell Programming and Scripting

shell script to search content of file with timestamps in the directory

hello, i want to make a script to search the file contents in my home directory by a given date and output me the line that has the date... (10 Replies)
Discussion started by: psychobeauty
10 Replies

8. Shell Programming and Scripting

File timestamps in different servers.

Hello, I need to gather timestamps and file sizes of all the list of files in different servers. The servers and file locations will be different for each file. I'm thinking of keeping a comman delimited file with {source_server_name,source location, file name} as records in the file. So, I... (1 Reply)
Discussion started by: bperl
1 Replies

9. UNIX for Dummies Questions & Answers

find command not giving file names accord. to timestamps

Currently iam working on solaris environment, Iam using find command to get list of all files between any two given dates. But the find command is not listing files accord. to timestamp. I tried using -exec option as -exec ls -ltr {} \; Still the files are not listed according to timestamp..... (8 Replies)
Discussion started by: thanuman
8 Replies

10. Shell Programming and Scripting

Find command to get the timestamps

I want to have the timestamps of the files containing a specific string in them. I have tried using different combinations of find command and grep and ls but not giving the desired output. find $HOME/bin/shells -name "*" -print -exec ls -Flt {} -exec grep -i "abc" '{}' \; Please help. (8 Replies)
Discussion started by: nguda
8 Replies
Login or Register to Ask a Question