10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have multiple files in my log folder. e.g:
a_m1.log
b_1.log
c_1.log
d_1.log
b_2.log
c_2.log
d_2.log
e_m1.log
a_m2.log
e_m2.log
I need to keep latest 10 instances of each file.
I can write multiple find commands but looking if it is possible in one line.
m file are monthly... (4 Replies)
Discussion started by: wahi80
4 Replies
2. Shell Programming and Scripting
I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also?
I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies
3. Shell Programming and Scripting
Hello All,
Can someone please help me out in creating the find command to search and delete files older than 1 days at a desired location.
Thanks in advance for your help. (3 Replies)
Discussion started by: Pandee
3 Replies
4. Shell Programming and Scripting
hello,
i am trying to get a list of files to be scped from the remote server
by running the below in my local unix server ( note - there is a passwordless connectivity setup made between the local and remote server) and, we use KSH.
---
ssh $scp_host "find /a/b/c/*/ -iname "$remote_file"" >... (4 Replies)
Discussion started by: billpeter3010
4 Replies
5. Shell Programming and Scripting
Hi experts,
can anyone suggest me on the below:
how to write a shell script to search and delete files on windows server.
-script runs on unix box
-it should search for specific files on windows server and delete them periodically. (2 Replies)
Discussion started by: chpradeepch
2 Replies
6. Shell Programming and Scripting
I need to archive the older than 30 day file to another uinx server.I have wrote the below uinx script.
for LOOK_DIR in /TempFiles
do
for FILE in `find ${LOOK_DIR} -mtime -30 -exec ls {} \;`
do
echo ${FILE} >> file_list ## This file will have the list of files copied and... (12 Replies)
Discussion started by: murari83.ds
12 Replies
7. Shell Programming and Scripting
Dear all,
i use incremental backup my data with .zip to my hard drive. what i need is i don't want the old .zip file older than 30 days. how to write a shell script automatically remove my external hard disc zip backup folders older than 30 days?
Regards, (2 Replies)
Discussion started by: joneggk
2 Replies
8. Red Hat
Hi,
I have dummies questions:
My script here can find the files in any directories older than 30 days then it will delete the files but not the directories. I would like to also be able to delete the directories that hold old files more than 30 days not just the files itself.
find . -type f... (2 Replies)
Discussion started by: lamoul
2 Replies
9. Shell Programming and Scripting
I'm new to shell script.... can any one help...
What is the shell script to delete the files older than 2 days ? (3 Replies)
Discussion started by: satishpabba
3 Replies
10. Shell Programming and Scripting
find /basedirectory -type f -mtime +3 >> /tmp/tempfile
find /basedirectory -type d -mtime +3 >> /tmp/tempfile
mailx -s "List of removed files and folders" myemail@domain.com < /tmp/te
mpfile
rm /tmp/tempfile
find /basedirectory -type f -mtime +3 -exec rm {} \;
find /basedirectory -type d... (7 Replies)
Discussion started by: melanie_pfefer
7 Replies