I have to capture the creation date and time stamp for a file. The ls command doesn't list all the required information. I need year, month, day, hour, minute and second.
Any ideas... (1 Reply)
Hi,
can any one tell me how to achieve this...I will input the path and file name and it should rename it to current date and time...
this is what I tried...
#! /usr/bin/sh
set -x
cd /info_stg/vul/Scripts
TODAY_DATE_TIME=`date +%Y%m%d%H%M%S`
IN_FILE_PATH=`cat file.txt | awk -F, '{... (2 Replies)
Dear Gurus,
I'm trying to move a number of files from one directory to another directory with a new date stamp. This is my script:
#! /bin/csh
Today_Date=`date +%Y%M%D`
mv /usr/TRS/data/TS* /usr/TRS/backup/TS*.${Today_Date}
when i run the script i'm getting the following errors:
mv:... (14 Replies)
Hi Everyone,
I want to delete some files in a path based on the time stamp of the file that is i want to delete the file once in a month.
Can any one help me on this?
Thanks in advance (2 Replies)
Hi,
I am using the below copy command, to copy the file sbn to sbn1,
cp sbn sbn1
but its changing the date stamp of file sbn1, but i dont want to change the date stamp of sbn1.
Could you please help me out in this. (3 Replies)
I need to alter a file.
I'm using sed then passing output to temp file
then using touch -r to maintain the date but the permissions do not get preserved
How can I sed a file and maintain date and permissions
currently
it's preserving the date but the permissions revert back to the... (3 Replies)
Hi
I use "touch -t xxxxxxxx" command to set date/time stamp of a file. My requirement is to read the date/time stamp of a file and apply it to another file.
Is there anyway to do it simple instead of manually taking date/stamp of first file?
TIA
Prvn (2 Replies)
Hi!
Please see our current script:
#!/usr/bin/ksh
if (egrep "This string is found in the log" /a01/bpm.log)
then
mailx -s "Error from log" me@email.com, him@email.com </a01/bpm.log
fi
To the above existing script, we need to add the following change:
1) After finding the string,... (7 Replies)
trying to add a date stamp to the name of a file with sed. can't seem to comment out the date command so that sed does not only see it as a literal text string
this is what I'm trying
ls file.txt | sed 's/file.txt/file\/`date`\/.txt/g'but it's giving this
file/`date`/.txtlooking for something... (1 Reply)
Discussion started by: jimmyf
1 Replies
LEARN ABOUT HPUX
strclean
strclean(1M)strclean(1M)NAME
strclean - remove outdated STREAMS error log files
SYNOPSIS
logdir] age]
DESCRIPTION
cleans the STREAMS error logger directory of log files mm-dd) that contain error messages sent by the STREAMS log driver, strlog(7). If
the option is not used to specify another directory, removes error log files in the directory. If the option is not used to specify
another age, removes error log files that have not been modified in three days.
Options
recognizes the following options and command-line arguments:
Specifies a directory for the location of the
STREAMS error log files to be removed if this is not the default directory
Specifies a maximum age in days for the
STREAMS error log files if this not the default age of 3. The value of age must be an integer greater than or less than 3.
EXAMPLES
Remove day-old error log files from a directory called
FILES
One or more error log file or files on which operates. The mm-dd in the filename indicates the month and day of the messages con-
tained in the file.
NLS catalog for
SEE ALSO strerr(1M), strlog(7).
strclean(1M)