9 More Discussions You Might Find Interesting
1. Linux
Hi,
I am trying to run a command that finds all files over x amount of days, issue is one of the directories has spaces within it.
find /files/target directory/*/* -type f -mtime +60 When running the above the usual error message is thrown back
+ find '/files/target\' 'directory/*/*' -type... (1 Reply)
Discussion started by: Ads89
1 Replies
2. Shell Programming and Scripting
Hello all,
do you know any way i can i move folders and its content if folder is older than 1,5 days in bash?
I tried:
find /home/xyz/DATA/* -type d -ctime +1.5 -exec mv "{}" /home/xyz/move_data_here/ \;All i got was that Files from DATA /home/xyz/DATA/* ended messed up in... (1 Reply)
Discussion started by: ZerO13
1 Replies
3. UNIX for Advanced & Expert Users
Hello,
I have a script which finds files in a directory that are older than 30 days and moves them to the specified directory.
The problem is I don't know why it works the way it does?
Code:
find . -name '*.sql' ! -mtime -30 -exec mv '{}' /dataload/archivelogs \;
I was under the... (4 Replies)
Discussion started by: pure_jax
4 Replies
4. 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
5. 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
6. UNIX for Dummies Questions & Answers
Hi
I am facing problem in using this command,
mv `find /export/june/PURGEDATA*.txt -mtime +2 -exec ls {} \;` june/archive/
mv: Insufficient arguments (1)
Usage: mv f1 f2
mv f1 ... fn d1
mv d1 d2
Thank you in advance (2 Replies)
Discussion started by: vishwakar
2 Replies
7. Shell Programming and Scripting
I Need help for one requirement,
I want to move the latest/Older file in the folder to another file. File have the datetimestamp in postfix.
Example:
Source Directory : \a
destination Directory : \a\b
File1 : xy_MMDDYYYYHHMM.txt (xy_032120101456.txt)
File2: xy_MMDDYYYYHHMM.txt... (1 Reply)
Discussion started by: pp_ayyanar
1 Replies
8. Shell Programming and Scripting
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)
Discussion started by: krishnarao
3 Replies
9. UNIX for Advanced & Expert Users
Hi,
I am trying to write a script that will move all the files from source directory structure(multiple levels might exist) to destination directory structure. If a sub folder is source doesnot exist in destination then I have to skip and goto next level. I also need to delete the files in... (4 Replies)
Discussion started by: srmadab
4 Replies