10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Trying to delete my 3 oldest files.
I am learning despite the many questions.
This shows the files.
ls -1r /media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/Ubuntu_Documents.zip_* | tail -n+6adding this on did not work.
| -exec rm {}------ Post updated at 05:43 PM ------
This works, but I... (15 Replies)
Discussion started by: drew77
15 Replies
2. UNIX for Advanced & Expert Users
There are some 25,000 files in 7,000 directories in my source library and I am trying to find oldest files. I am running this find:
find /usr/mysrc -name "*." -type f -mtime +8000 -exec ls -l {} 2>/dev/null
and playing with the days parameter for mtime, but the output is not sorted... (3 Replies)
Discussion started by: migurus
3 Replies
3. Shell Programming and Scripting
Hi All,
I have multiple files in the folder, I want to move those files into the other folder on based of name
File names:
Template_server1_01==>
Template_server1_02==>To one directory /Server1
Template_server1_03==>
Template_server2_01==>
Template_server2_02==>To one... (9 Replies)
Discussion started by: sharsour
9 Replies
4. Shell Programming and Scripting
I need a script to clean up the files on our backup system. I was hoping this would be simple for someone to put together for me.
I'm sure I could do it, but I'm a bash n00b so it would definitely not be efficiently or within a reasonable amount of time. :(
Requirements:
- Root of backups... (3 Replies)
Discussion started by: Calab
3 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I need to delete the oldest file in folder when the file count in the folder exceed 6 ( i have a process that puts the source files into this folder )
E.x : Folder : /data/opt/backup
01/01/2012 a.txt
01/02/2012 b.txt
... (1 Reply)
Discussion started by: akshay01987
1 Replies
6. Shell Programming and Scripting
Hi,
I have a requirement ,let us say 1000 files needs to be transferred in an hour from one path to another path and if the files (1000 files) are transferred within an hour ( say 40 mins), then the process should remain idle for the remaining time ( 20 mins). (3 Replies)
Discussion started by: Asaikarthik
3 Replies
7. Shell Programming and Scripting
Hi all,
I always getting great response from this forum, that why i am putting again....
I am working in a company which is giving ATM support.In one of my production server a lot of files are getting generated every day. I want to move these files to another name.
The file name which is... (4 Replies)
Discussion started by: Renjesh
4 Replies
8. Shell Programming and Scripting
Hi,
I have a very urgent requirement here. I have to find all files in the specified directory but not in the sub directories(The directory name is stored in a variable) which are older than the current date as well as current time and rename it as filename_yyyymmddhhmmss.ext and move it into a... (7 Replies)
Discussion started by: ragavhere
7 Replies
9. Shell Programming and Scripting
I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves.
Also, the script should only move a file from /exports to... (6 Replies)
Discussion started by: nikosey
6 Replies
10. Shell Programming and Scripting
Anyone know of a way to list all of the files including subdirectories and list them as oldest first? (2 Replies)
Discussion started by: 2dumb
2 Replies