Rename a log file to old, then create a new log file.
Hi all,
I have about 15 directories all with exactly the same structure. I have a file in each of them called log.txt. This file sits in /home/ftp/*usernamehere*/ftptransfer/log/
Username here is the only change in each of the 15 directories.
I want to create a SIMPLE shell script that go's into each directory and renames the log.txt files to log.txt.old, and then recreates log.txt (would need to remove the log.txt.old when it runs for the second time.
I kind of had an attempt but ran into a few issues... Heres my code
Hi guys. Can someone point me to a resource that explains this? Basically these are websphere logs that need to be stored daily, I'm on sunOS 5.8. Each new file stored could have the current time as its filename. The script could be run on a cron which I can set up. I'm just not sure how to write... (0 Replies)
Accept command line input of a directory
keep a .logfile of the contents of the directory inputed
if a .logfile does not exist create one for the file that is missing a .logfile and create a message stating .logfile was updated
if all .logfiles are there display message stating all files are... (1 Reply)
Hi Experts,
i am new in shell programming. i am having some problem of checking the log file age and rename it.
for example:
when i run the shell script, the script will check how old is the log file, if the log is already 10 days old(variable). then the log file will rename.
hope to... (3 Replies)
OS: Sun Solaris ver 9
From server1: as root userid
ssh server2 /export/home/user1/.ssh/s2.sh
logtest=/export/home/user1/test.log
log1=/u03/user2/comn/admin/log/
uname -a >> $logtest --> log file able to generate
uname -a >> $log1 --> not able to as /u03/user2/comn/admin/log is NFS from... (3 Replies)
hi,
How to create a log file of a script. Like spool does .
I want to create a log file of whatever the script is doing step wise.
like -xvf does or something better then that.
thanks ... (3 Replies)
Hi all.
My box run Solaris 10. When I reboot the machine I have the message " ttymon cannot create logfile".
Anyone know that's going on?
How to prevent this message?
Thanks in advance. (0 Replies)
Hi,
I want to create a log file for a running ksh , and the log file absolute path I want to give in ksh itself.
To elaborate this - Say I have a ksh - timer.ksh and I want to create a log timer_log.log when I run, to trace this. I am aware of the fact that this can be done using redirection... (4 Replies)
Newbie...Thank you for your help.
I am creating my first script that simply generates subdirectories to organize video, music, and text files within those subdirectories from my current working directory.
PROBLEM: I am trying to write a log file that contains, for each file, the original file... (0 Replies)
I need to create shell script (check system ) to display the output to the console and write these output to a log file at the same time.
My shell script is like that
Main() {
....
....
}
MainIt takes about 30s to display all the output to the console.
Then I put this command to the... (4 Replies)
Hi all,
could any provide me a solution for the below requirement.
I have two files namely abc.log.1 and abc.log.2
The above files have time stamp as Dec 08 and Dec 09
I need to rename the files as abc.log.1_20141208 and abc.log.2_20141209 and move to another bkp directory.
Thanks in... (2 Replies)
Discussion started by: bhaskar t
2 Replies
LEARN ABOUT CENTOS
pmdanamed
PMDANAMED(1) Performance Co-Pilot PMDANAMED(1)NAME
pmdanamed - BIND (named) PMDA
DESCRIPTION
pmdanamed is a Performance Metrics Domain Agent (PMDA) which exports metric values from the BIND DNS server. Further details on BIND can
be found at http://isc.org/.
INSTALLATION
If you want access to the names and values for the named performance metrics, do the following as root:
# cd $PCP_PMDAS_DIR/named
# ./Install
If you want to undo the installation, do the following as root:
# cd $PCP_PMDAS_DIR/named
# ./Remove
pmdanamed is launched by pmcd(1) and should never be executed directly. The Install and Remove scripts notify pmcd(1) when the agent is
installed or removed.
FILES
/var/named/data/named_stats.txt
statistics file showing values exported from named
/var/named/chroot/var/named/data/named_stats.txt
chroot variant of statistics file showing values exported from named
$PCP_PMDAS_DIR/named/Install
installation script for the pmdanamed agent
$PCP_PMDAS_DIR/named/Remove
undo installation script for the pmdanamed agent
$PCP_LOG_DIR/pmcd/named.log
default log file for error messages from pmdanamed
SEE ALSO pmcd(1), named.conf(5), named(8).
3.8.10 Performance Co-Pilot PMDANAMED(1)