I want to list the files older than 10 days. Currently am using
command. But I want to execute the same command in 16 directories at a time and want an output asking to remove those file?
Please help me to design the script.
regards,
Ajay
Last edited by Don Cragun; 01-28-2016 at 02:19 PM..
Reason: Add CODE tags.
I will like to write a script that delete all files that are older than 7 days in a directory and it's subdirectories. Can any one help me out witht the magic command or script?
Thanks in advance,
Odogboly98:confused: (3 Replies)
Say folder archive/ contains many folder each created on a day. this folder may contain files. i want to write a script to delete all the folder inside archive/ which are 7 days older. i used the below script for the reason.
find archive -mtime +7 -type d -exec rm -r {} \;
pls suggest me if... (3 Replies)
Hi everyone :)
I have a little question here, at my work, we have a system running Solaris 10 - with an attached EMC SAN, the SAN is running out of space, and we are moveing the data to a new EVA SAN.
The problem here is, that there are over 35.000.000 files on the system, and constantly 30... (4 Replies)
i have to delete files which are older than 15 days or more except the ones in the directory Current and also *.sh files
i have found the command for files 15 days or more older
find . -type f -mtime +15 -exec ls -ltr {} \;
but how to implement the logic to avoid directory Current and also... (3 Replies)
Hi Frnds,
I have to list the files which are older than 7 days in the given directory.
it should consider only the files and should not show subdirectories.
Thanks,
Raja (3 Replies)
Hi All,
OS :- HP-UX wm5qa B.11.23 U ia64 1119805695 unlimited-user license
I need to search files older than 50 days. I've used following command in order to search desired files, I also discoverd, it's showing today's files as well. Do you have any clue with this ?
wmqa1> find .... (4 Replies)
Hi
I want to find the total space used by the files which are older than x days
find ./ -type f -mtime +x-days -name "G00*" -exec du {} \; | awk '{total+=$1}END{print "TOTAL" total}'
Total prints as 17.20 MB ( total / 1024*2 )
But actual size of it will be around 18.5 GB... (1 Reply)
Hi,
I would like to list all files, older than 7 days, in a directory, but exclude all subdirectories in the find command. If I use find . -type f -mtime +7 all files in the subdirs are also included. How can I exclude them?
Regards,
JW (6 Replies)
Requirement is to list the files older than 365 days from multiple directories and delete them and log the list of files which are deleted to a log file.
so 1 script should only list files older than 365 days for each directory separately to a folder
The other script should read these files... (7 Replies)
I need to list and delete all files in current older which are olderthan 7 days. But my file names have white spaces. Before deleting I want to list all the files, so that I can verify.find . -type f -mtime +7 | xargs ls -l {}
But the ls command is the working on the files which have white... (16 Replies)