[Solved] How to tar data along with current system date and time.?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting [Solved] How to tar data along with current system date and time.?
# 8  
Old 01-31-2013
Local system time.

Because you captured the time-stamp and created your tar file in your local system.
# 9  
Old 01-31-2013
Yes Sir,
it create tar with city Amsterdam local time.

---------- Post updated at 02:30 AM ---------- Previous update was at 02:28 AM ----------

Thank You very much sir.
I am beginner in scripting,but surely If I get such ideas I will do more practice on this stuff.

---------- Post updated at 02:32 AM ---------- Previous update was at 02:30 AM ----------

one more question:
Code:
drwxr-xr-x   2 sysmgr   staff        512 Jan 31 21:17 ./
drwxr-x---   8 sysmgr   staff       1024 Jan 31 21:12 ../
-rw-r--r--   1 root     root         393 Jan 31 21:17 dfstab
-rw-r--r--   1 root     root         401 Jan 31 21:17 group
-r-xr-xr-x   1 root     root         641 Jan 31 21:17 init*
-rw-r--r--   1 root     root        2982 Jan 31 21:17 passwd
-r--r--r--   1 root     root        1614 Jan 31 21:17 passwd-default
-rw-r--r--   1 root     root        1258 Jan 31 21:17 profile
-r--r--r--   1 root     root        5007 Jan 31 21:17 services
-r--------   1 root     root        1328 Jan 31 21:17 shadow
-r--r--r--   1 root     root           0 Jan 31 21:17 sharetab
-r--r--r--   1 root     root         132 Jan 31 21:17 shells
-rw-r--r--   1 root     root        7867 Jan 31 21:17 system
-rw-r--r--   1 root     root        2871 Jan 31 21:17 vfstab

these files will be overwritten next time when I execute same script right ?
# 10  
Old 01-31-2013
Which path are you referring to here? If you are talking about the recursive copy that you are performing, then yes the files will be overwritten.
This User Gave Thanks to Yoda For This Post:
# 11  
Old 01-31-2013
Wonderful explanation. You solved all my problems.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to substract date with current date and time

I have below file which contain the date in column 3,4,5 12345 open 10/10/13 10:08 PM 3 application is in java 67899 open 12/10/13 2:31 AM 2 apps can be reach 23456 open 11/9/13 2:31 AM 4 java is OK 65432 open 12/10/13 10:07 PM 9 we are... (1 Reply)
Discussion started by: vijay_rajni
1 Replies

2. Shell Programming and Scripting

Add current date and time

i have file 1.txt asdas|csada|13|03|10|04|23|A1|canberra sdasd|sfdsf|13|04|26|23|28|A1|sydney i want to add today's date and time in the end of each row expected output asdas|csada|13|03|10|04|23|A1|canberra|130430|1358 sdasd|sfdsf|13|04|26|23|28|A1|sydney|130430|1358 todays date... (10 Replies)
Discussion started by: radius
10 Replies

3. Shell Programming and Scripting

Displaying current date time of EDT in IST time

Hi Folks, My server time is in EDT. And i am sending automated mails from that server in which i need to display the current date time as per IST (GMT+5:30). Please advice how to display the date time as per IST. IST time leads 9:30 mins to EDT. and i wrote something like below. ... (6 Replies)
Discussion started by: Showdown
6 Replies

4. UNIX for Dummies Questions & Answers

Adding hours and minutes to current date (Only to date not to time)

Hi, I want to add some hours and minutes to the current date. For example, if the current date is "July 16, 2012 15:20", i want to add 5 hours 30 minutes to "July 16, 2012 00:00" not to "July 16, 2012 15:20". Please help. Thanks! (4 Replies)
Discussion started by: manojgarg
4 Replies

5. Shell Programming and Scripting

How far is given date from current time?

give a date and time: Jun 12 21:05:16 06-12-2012 21:05:16 2012/06/12 21:05:16 How can i subtract these dates and times from the current date and time and get back the difference in seconds? a one liner like: echo "Jun 12 21:05:16" | some perl/awk programming 90900s (2 Replies)
Discussion started by: SkySmart
2 Replies

6. UNIX for Dummies Questions & Answers

Comparing Output Date to Current System Date

Hi Guys, Anyone who knows how to compare the current date with the a file containing a date, say for example I have a file that looks like this: Command was launched from partition 0. ------------------------------------------------ Executing command in server server6 Fri Dec 16... (7 Replies)
Discussion started by: rymnd_12345
7 Replies

7. UNIX for Dummies Questions & Answers

Delete a row from a file if one column containing a date is greater than the current system date

Hello gurus, I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4: NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies

8. Shell Programming and Scripting

how to get what date was 28 days ago of the current system date IN UNIX

Hi, Anybody knows how to get what date was 28 days ago of the current system date through UNIX script. Ex : - If today is 28th Mar 2010 then I have to delete the files which arrived on 1st Mar 2010, (15 Replies)
Discussion started by: kandi.reddy
15 Replies

9. UNIX for Dummies Questions & Answers

get current system date

How do I create a shell script that would get the current system date in format of yyyymmdd and use that result to concatenate it to a filename that it would look like this: sample20051024.dat example -------- current system date: 24-Oct-2005 filename: sample.dat when the shell script... (5 Replies)
Discussion started by: wtolentino
5 Replies

10. Shell Programming and Scripting

Get date and time for past 1 hour from current date

Hi, I need to get the date and time for past 1 hour from the current date. Anyone know how to do so? Thanks (5 Replies)
Discussion started by: spch2o
5 Replies
Login or Register to Ask a Question