File timestamps in different servers.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting File timestamps in different servers.
# 1  
Old 03-06-2008
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 would cut and get the server, location and file names.

SOURCE_SERVER=`cat $file_list |cut -d"," -f1`
FLOCATION=`cat $file_list |cut -d"," -f2`
FNAME=`cat $file_list |cut -d"," -f3`

Is there any easy way where I can get the file time stamp (modified and/or created) in the source servers?
And how would I connect to different servers (connect and exit out) in the file_list till the timestamp for all the files are captured.

Is telnet better? If telnet is disabled in some servers, can I get timestamp with ssh? I might have to use combination of different connections depending upon which ports are open.

Thanks in advance.
# 2  
Old 03-07-2008
any idea how to capture timestamps of files in different servers guys?
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

timestamps

Hello! I have the following problem. I read a file using perl, each line of this file has the fllowing format. 14/4/2008 8:42:03 πμ|10800|306973223399|4917622951117|1||1259|1|126|492|433||19774859454$ Th first field is the timestamp and the second field is the offset in seconds. How can... (1 Reply)
Discussion started by: chriss_58
1 Replies

8. 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

9. UNIX for Advanced & Expert Users

mv command and file-timestamps

Hi all, I need help to find out if it is possible (if so, how? :D ) 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).... (1 Reply)
Discussion started by: gian1975
1 Replies

10. 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
Login or Register to Ask a Question