10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Ive been a vocal of FIND command even before. Command below doesnt really give me the file that is older than two weeks.. Is there a script that will list me the log files that i want like for this date December 10, 2014, it shud list me the date between November 26, 2014 and below.
When i run... (6 Replies)
Discussion started by: kenshinhimura
6 Replies
2. Shell Programming and Scripting
I have written a script which generate one logfile on every sunday and thursday
I want to move the older log files into /tmp directory befor generating new one so i used mv command like
mv usr/sbin/appl/logfile.txt usr/sbin/appl/tmp
2) But when i move this file to /tmp it will... (1 Reply)
Discussion started by: Nakul_sh
1 Replies
3. AIX
how do i remove sub directories of a directory and all files which are older than 7 days by a single command in AIX. pls help me.
I am using command as
#find /gpfs1/home/vinod/hpc/ -depth -type d -mtime +7 -exec rm -rf {} \;
so i want to delete all sub directories and all files from the... (1 Reply)
Discussion started by: vinodkmpal
1 Replies
4. Shell Programming and Scripting
There is another post in the forums that is similar to what I am trying to do, however, the thread is closed. So, I am creating this new one to see if someone could help. I am trying to use the code Ahamed posted, and tweak it.
With the info from the forum, I recreated the scenario the person... (8 Replies)
Discussion started by: karstenjhilton
8 Replies
5. Shell Programming and Scripting
I need help.
I have to delete multiple directories inside a directory that are two weeks old.
Example: Today is July 09, 2012
Folder1 > folder1 (created June 4, 2012) -- should be deleted
> folder2 (created June 2, 2012) -- should be deleted
> folder3 (created... (4 Replies)
Discussion started by: jasperux
4 Replies
6. Shell Programming and Scripting
Hi All
I want to remove the files with name like data*.csv from the directory older than 10 days.
If there is no files exists to remove older than 10 days, It should not do anything.
Thanks
Jo (9 Replies)
Discussion started by: rajeshjohney
9 Replies
7. Shell Programming and Scripting
I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y"
#!/bin/bash
du -hs $1
while read SIZE ENTRY
do
if ;
then
find $1 -mtime +$2 -exec rm -f {} \;
echo "Files older than $2 days deleted"
else
echo "free Space available"... (4 Replies)
Discussion started by: JamesCarter
4 Replies
8. Emergency UNIX and Linux Support
(12 Replies)
Discussion started by: rajsharma
12 Replies
9. Shell Programming and Scripting
sorry guys can some please give me a hint how to achieve this in a slick oneliner?
delete files older than 5 minutes in specified directory (recursively)
peace (3 Replies)
Discussion started by: scarfake
3 Replies
10. Shell Programming and Scripting
HI,
I need to check whether the given file is 5 weeks older than current date ??
Can anyone give me the script for this ?? (1 Reply)
Discussion started by: risshanth
1 Replies