10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'd like to write a monthly archive script that archives some logs. But I'd like to do it based on yesterday's date. In other words, I'd like to schedule the script to run on the 1st day of each month, but have the archive filename include the previous month instead.
Here's what I... (5 Replies)
Discussion started by: nbsparks
2. Shell Programming and Scripting
I am looking for some scripting help. I need to add a time stamp to a file name.
I will append data to a file, and want to add to the file name a time stamp of the previous Sundays date. Any takers? (1 Reply)
Discussion started by: sswagner8839
3. Shell Programming and Scripting
Ok, the title is confusing i know, but it is a weird question.
I have a bash script running on Centos5.8 and want to find a better way to do some date manipulation. What i am trying to do is get 3 days of files (day before, that day, and day after), concatenate the three files and pass them on... (2 Replies)
Discussion started by: oly_r
4. Shell Programming and Scripting
To delete log files content older than 30 days and append the lastest date log file date in the respective logs
I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs
This is my script
cd... (2 Replies)
Discussion started by: sreekumarhari
5. Shell Programming and Scripting
There are similar kind of posts, but none seems like working for me. Please correct me if I'm wrong.
I need append/rename file abc.txt with file processed date and time like abc_systemdatetimestamp.txt
and move it to different folder.
for example I have
... (1 Reply)
Discussion started by: amsn08
6. Shell Programming and Scripting
i would like to know how to append current date in a filename with .tgz extension.
my $date = `date + %Y%m%d`;
system("sudo mv /tmp/nyucs01_config_backup.tgz /misc/nyucs01_config_backup_$date.tgz");
im getting this error message:
sh: line 1: .tgz: command not found (7 Replies)
Discussion started by: linuxgeek
7. UNIX for Dummies Questions & Answers
I need to create a shell script that appends a filename to create a name with the date and time appended that is guaranteed to not exist. That is, the script insures you will not overwrite a file with the same name. I am lost with this one. I know I need to use date but after that I am... (3 Replies)
Discussion started by: citizencro
8. UNIX for Dummies Questions & Answers
I am familiar with using the 'date' command to get the current date but I have a situation where I need to get the previous day's date as well as the date two days prior. Theoretically I could use 'expr' to compute these values but I need it to work in instances where the previous month's dates... (2 Replies)
Discussion started by: slant-40
9. UNIX for Dummies Questions & Answers
In C Shell programming I haven't successfully been able to append the date in the format mmddyyyy to a filename. I've tried the following:
I can print out the date in the correct format: date +%x | sed ‘s/\///g
I can create a variable with the filename: set newfile=changedfiles
I can... (3 Replies)
Discussion started by: gigigi
10. UNIX for Dummies Questions & Answers
What is the easiest way to append the date (year, month, day) to a filename? (5 Replies)
Discussion started by: hshapiro