My shell script runs everyday to update certain database. Everytime the script runs it creates a directory, with "current date". These directories contain log and data files:
Now, when I run the update on "20120418", I want to delete "20120415" --- therefore keeping only 3 updates at a time. When it updates on 20120419 - i should only have 20120416 & 20120417 directories.
Is there a way to incorporate this in my script ???
Thanks in advance !
Last edited by ad23; 04-18-2012 at 06:24 PM..
Reason: Typo error -> I want to delete "20120415" and not "20120416". Therefore keeping the last 3 latest directories.
Hello,
I need a hand with a script im trying to make. I have a directory
/usr/db/mail with a bunch of subdirectories such as
/usr/db/mail/domain1.com
/usr/db/mail/domain2.com etc. etc.
all of these directories in turn have sub directories of their own. What I need to do is search all of... (1 Reply)
I have a script that deletes obselete users from /etc/passwd then moves their home directories to another location. After 30 days, I need to delete the home directories that were moved to the new location. I would appreciate any ideas on how to delete the directories after the 30 days? (2 Replies)
hi im so sorry i do not have time im doing an urgent cleanup.
I have to check on directories for example:
/export/home/itbr
/export/home/bscsmig
there are more but i have the list. how do i write a ksh script in for loop to check those directories and delete display a message if it was... (1 Reply)
Hi
I have 10 directories.I want to delete all the dicrectories except the three recent directories based on timestamp.I am new to BASH can u help me? (1 Reply)
Hi,
I have a requirement like,
I need to create the directory with date and time stap (i.e YYYYMMDDHMS) every day end need to delete the old directories which is 12 months old. I have tested with following script
cd /export/home/sbeeravo/; find . -type d -mtime +365 -exec rm -rf {} \;
... (2 Replies)
Hi All,
I am trying to delete Files from a directory using the below command
find $/test/abc/xyz -mtime +30 -exec rm -f {} \;
The above command is deleting the files more than 30 days.
The problem is there are some subdirectories in xyz,
when i execute the above command its trying to delete... (3 Replies)
Hello,
i have an dynamical apache_cache that I need to clean all days (older tant one day) with an unix command :
find /usr/IBM/HTTPServer/apache_cache/ -name '*' -mtime +1 -print0|xargs -0 rm -r --
but it didn't work.
Could you explain me why.
So I will put below all my script :... (13 Replies)
Is there a way via some bash script or just cmd to find duplicate directories?
i have main folders:
TEST1
TEST2
In folder TEST1 is some amount of same folders as in folder TEST2
can be this done? i tried fdupe but it only search for dupe files not whle dirs
thx! (8 Replies)
Discussion started by: ZerO13
8 Replies
LEARN ABOUT CENTOS
kproplog
KPROPLOG(8) MIT Kerberos KPROPLOG(8)NAME
kproplog - display the contents of the Kerberos principal update log
SYNOPSIS
kproplog [-h] [-e num] [-v] kproplog [-R]
DESCRIPTION
The kproplog command displays the contents of the KDC database update log to standard output. It can be used to keep track of incremental
updates to the principal database. The update log file contains the update log maintained by the kadmind(8) process on the master KDC
server and the kpropd(8) process on the slave KDC servers. When updates occur, they are logged to this file. Subsequently any KDC slave
configured for incremental updates will request the current data from the master KDC and update their log file with any updates returned.
The kproplog command requires read access to the update log file. It will display update entries only for the KDC it runs on.
If no options are specified, kproplog displays a summary of the update log. If invoked on the master, kproplog also displays all of the
update entries. If invoked on a slave KDC server, kproplog displays only a summary of the updates, which includes the serial number of the
last update received and the associated time stamp of the last update.
OPTIONS -R Reset the update log. This forces full resynchronization. If used on a slave then that slave will request a full resync. If used
on the master then all slaves will request full resyncs.
-h Display a summary of the update log. This information includes the database version number, state of the database, the number of
updates in the log, the time stamp of the first and last update, and the version number of the first and last update entry.
-e num Display the last num update entries in the log. This is useful when debugging synchronization between KDC servers.
-v Display individual attributes per update. An example of the output generated for one entry:
Update Entry
Update serial # : 4
Update operation : Add
Update principal : test@EXAMPLE.COM
Update size : 424
Update committed : True
Update time stamp : Fri Feb 20 23:37:42 2004
Attributes changed : 6
Principal
Key data
Password last changed
Modifying principal
Modification time
TL data
ENVIRONMENT
kproplog uses the following environment variables:
o KRB5_KDC_PROFILE
SEE ALSO kpropd(8)AUTHOR
MIT
COPYRIGHT
1985-2013, MIT
1.11.3KPROPLOG(8)