Sponsored Content
Top Forums Shell Programming and Scripting rename file to file.ext.datetime Post 302136951 by jim mcnamara on Thursday 20th of September 2007 04:07:38 PM
Old 09-20-2007
Code:
mv err.log error.log.`date +%Y%m%d_%H%M`

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

DateTime Format Conversion in a File

Hi Pals. I have a file which is in the below format. 2007/10/15-12:04:24,'CRLift','TH-42PX75U','BestBuy','W01P0207',22,15,'User1' 2007/10/15-12:04:26,'CRLift','TH-42PX75U','BestBuy','W01P0207',22,15,'User2' 2007/10/15-12:04:29,'CRLift','TH-42PX75U','BestBuy','W01P0207',22,15,'User3'... (4 Replies)
Discussion started by: srikanthgr1
4 Replies

2. Shell Programming and Scripting

Shell script to rename files with .1,.2,.3 ....ext respectively

Hey Guys.... Just need some help as I am not proficient in Unix shell script... Doubt: --------------- Suppose there will be some of the following files inside a directory called OUT ... Path: - /appdb1/product/batch/rms/OUT files inside OUT directory:- POSU_75002_20090127_20090129035442... (4 Replies)
Discussion started by: satyajit007
4 Replies

3. UNIX for Advanced & Expert Users

shred() not working on ext* file systems

When vfat format my128kb flash drive, shred works fine. But, when I format it using ext2 or ext3, shred() exits with this error: shred: /dev/sdb1: pass 1/1 (random)... shred: /dev/sdb1: error writing at offset 12288: Invalid argumentAnyone know what is going on? (0 Replies)
Discussion started by: codecellar
0 Replies

4. UNIX for Advanced & Expert Users

Rename a file to a file_current datetime in a shell script

Hi all, Could anyone suggest me on Renaming a file to a file_current datetime in a shell script. (3 Replies)
Discussion started by: Nithin
3 Replies

5. Shell Programming and Scripting

.sh file To rename existing file and copy new file

Hi All, I am very new to shell scripting . In my current task i want to create .sh file that will rename the existing file with appending _bu in it. And then copy new file . e.g if i have file linuxFirst.java then i want to rename it to linuxFirst_bu.java ..Then want replace with latest... (1 Reply)
Discussion started by: maheshkaranjkar
1 Replies

6. Shell Programming and Scripting

Duplicate name diff file ext

Hi All I have converted a load of files to different formats but I am now left with a folder with loads of differnt files All of them are called the same, the only differnce is the file extension (Sizes also vary so cannot do anything with MD5) example file1.abc file1.xyz file2.abc... (2 Replies)
Discussion started by: tofa83
2 Replies

7. Shell Programming and Scripting

Script to monitor for new file with ext .err and size > 0 bytes and perform a action or command

Hi All, I need to create a script to monitor a dir for new files with ext .err and also it should b a non empty files. and perform a action or command . We have a new ETL application that runs on a linux server, every times a etl fails it creates a .err file or updates the existing .err... (4 Replies)
Discussion started by: MAKHAN
4 Replies

8. Shell Programming and Scripting

ext File

I have a log file that I want to extract the field name and the field value and write them to a text file for importation it a database table for reporting purposes. How can I extract the desired data from this file . Example: dbt_dbid=4 dbt_dbid is the field name 4 is the field value... (4 Replies)
Discussion started by: JolietJake
4 Replies
ds.log(4)							   File Formats 							 ds.log(4)

NAME
ds.log - Availability Suite data services log file DESCRIPTION
The /var/adm/ds.log file contains the Availability Suite data services command log. The administration commands log activities to the file in the format: date time product: message Note that when the size of the log file exceeds 10 Mbytes, ds.log is renamed /var/adm/ds.log.bak and a new /var/adm/ds.log file is cre- ated. The ds.log fields are: date The date format is mmm nn, where mmm is the local three-character abbreviation for the month and nn is the day of the month on which the event occurred. time The time of the event, in hh:mm:ss format. product A product code that identifies which component of the data services produced the event. The code is separated from the message that follows by a colon (:) and a space. message A message that can extend over more than one line describing the event that occurred. The second or following lines are not pre- fixed by the date, time, and product code strings. EXAMPLES
The example below shows sample ds.log file content: Jan 25 05:26:17 ii: iiboot suspend cluster tag <none> Jan 25 05:32:02 ii: iiboot resume cluster tag <none> Jan 25 05:32:04 sv: svboot: resume /dev/vx/rdsk/bigmaster Jan 25 05:32:04 sv: svboot: resume /dev/vx/rdsk/bigshadow Jan 25 05:32:04 sv: svboot: resume /dev/vx/rdsk/mstvxfs Jan 25 05:32:04 sv: svboot: resume /dev/vx/rdsk/master01 ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +---------------------+---------------------------------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +---------------------+---------------------------------------------------------+ |Architecture | x86 | +---------------------+---------------------------------------------------------+ |Availability | SUNWscmu | +---------------------+---------------------------------------------------------+ |Interface Stability | Committed | +---------------------+---------------------------------------------------------+ SEE ALSO
iiadm(1M), sndradm(1M), svadm(1M), attributes(5) SunOS 5.11 08 Jun 2007 ds.log(4)
All times are GMT -4. The time now is 06:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy