10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I'm new to shell scripting and need a quick note on how to write a shell script to perform deletion of files from 5 different hostnames in various locations.
Found out to delete files from one path by using below command and made it to work on cron job but need to do it in a shell... (2 Replies)
Discussion started by: Teja G
2 Replies
2. Shell Programming and Scripting
Hello,
I needed help with a shell script where in it checks if a file exists under a directory and also checks the age of the file and delete it if it is older than 3 weeks.
thanks (10 Replies)
Discussion started by: hasn318
10 Replies
3. Shell Programming and Scripting
Hello,
we have more than 100000 files in a directory which are write-protected regular file, these files are quite old and would like to delete them completely, Kindly let me know the command or peice of code to automate the process.
The filenames are like below
MPNT_... (6 Replies)
Discussion started by: Hadoop_Master
6 Replies
4. UNIX for Advanced & Expert Users
Hello, i'm trying to solve this script.
List, one at a time, all files larger than 100K in the /home/username directory tree. Give the
user the option to delete or compress the file, then proceed to show the next one. Write to a
logfile the names of all deleted files and the deletion times.
I... (7 Replies)
Discussion started by: jose2802
7 Replies
5. Shell Programming and Scripting
I want to use my script to get any file then delete it once it transfers to my side , I manage to create below script to generate "list" file which contains all file names in "10.10.1.1" then I made "a.out" file which contains the commands that I want to run it on "10.10.1.1" to get & delete the... (2 Replies)
Discussion started by: arm
2 Replies
6. Shell Programming and Scripting
I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies
7. Shell Programming and Scripting
hi,
I have 100 files say File1.mp3, File2.mp3 .......file100.mp3
i found that File1.mp3 to File50.mp3 are damaged.
I want to delete the damaged files from the directory using sed with regex how can i do this.
thanks (5 Replies)
Discussion started by: pchangba
5 Replies
8. Shell Programming and Scripting
i want to delete all the files in my directory except the latest one. i need to do this from shell script.
say i have
a.txt - latest file
b.txt,
c.txt..
it should delete all the files except a.txt? (4 Replies)
Discussion started by: krishnarao
4 Replies
9. Shell Programming and Scripting
Hi,
I have the following task to perform using shell script.
The user will provide a directory name along with a date. The script will delete all the files in the specified directory that was created earlier to that date. Also it should display the number of files that has been deleted.
... (7 Replies)
Discussion started by: theguy16
7 Replies
10. UNIX for Advanced & Expert Users
I'm trying to figure out a way to delete empty files in a directory. I have a cron that runs and creates a flat file every 15 mins. However, most times at night the flat file will be empty.
I'd like to run a script to delete empty files that end with *.dat
Any suggestions?
Rich (1 Reply)
Discussion started by: rpnuge
1 Replies