10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
can someone help me to create a short script that tar.gz all folders form a specific folder and the delete the folders themself (without deleting the tar.gz created files)?
Moreover I'd like to add it on crontab and run it each day.
For example: in /tmp I have:
/tmp/test/test1... (7 Replies)
Discussion started by: mab80
7 Replies
2. UNIX for Dummies Questions & Answers
I have an amount of folders and I want to delete only the empty ones. But I have more than 200 empty folders, so I would preffer do not delete one by one... I know it is possible, but I don't know how. I've tried with the size, using 'du' command, and saving the result in a file. After that, I made... (3 Replies)
Discussion started by: saitsug
3 Replies
3. Shell Programming and Scripting
Hi All,
I need a solution for the following scenario.
I am the owner for the particular folder and I have given 777 permissions for some specific reasons. So others can able to create folders and files.
But when I am done with the work, I need to delete the folders which are created by... (4 Replies)
Discussion started by: manoj_thorali
4 Replies
4. UNIX for Dummies Questions & Answers
I have a requirement to delete the files and folders under a given directory.
my directory structure is like this..
Data
|
A(Directory)
|_PDF(Directory)----pdf files
|_XML()Directory --xml files
|--files
|
B(Directory)
|_PDF(Directory)----pdf files
|_XML()Directory --xml files ... (1 Reply)
Discussion started by: ramse8pc
1 Replies
5. Shell Programming and Scripting
Folks,
I am hopeful that you may be able to help me out with writing a script that can be run nightly (as cron?) to loop through all subfolders within the "/media" directory, delete all of the files in each of them, and then copy in all of the files from the "/home//sansa" directory to each of... (6 Replies)
Discussion started by: acraig
6 Replies
6. Shell Programming and Scripting
Dear all,
i use incremental backup my data with .zip to my hard drive. what i need is i don't want the old .zip file older than 30 days. how to write a shell script automatically remove my external hard disc zip backup folders older than 30 days?
Regards, (2 Replies)
Discussion started by: joneggk
2 Replies
7. UNIX for Dummies Questions & Answers
I need to delete a folder and files in it of yesterdays and simply put this in cron.
Folder name - "2010-03-2010"
File name - "eprod_06_23.dmp" and "eprod_06_23.exp"
Actually this folder and file is been created by a script which takes a backup of DB everyday.Thats why it creates folder and file... (3 Replies)
Discussion started by: j_panky
3 Replies
8. Shell Programming and Scripting
Hi all,
I amd new in UNIX programming. I have a query.
I need to delete some files (like .dec files) from some folders. I have a list of folders. What will be command for it.
Please help me.
Thanks in Advance. (3 Replies)
Discussion started by: eclairs
3 Replies
9. UNIX for Dummies Questions & Answers
hi,
I've a folder structure like :
/home/project/LIBNAMEA/FILE1
/home/project/LIBNAMED/FILE2
/home/project/LIBNAMEC/FILE3
/home/project/LIBNAMED/FILE4
/home/project/LIBNAMEX/FILE5
(there is no relation in the letters after the project/ )
and i need to delete the files keeping... (5 Replies)
Discussion started by: jtmartins
5 Replies
10. Shell Programming and Scripting
Hi,
I want to write a script that deletes all folders and keep the last 10 recent folders.
I know the following:
ls -ltr will sort the folders from old to recent.
ls -ltr | awk '{print $9}' will list the folder names (with a blank line at the beginning)
I want to get the 10th folder from... (3 Replies)
Discussion started by: melanie_pfefer
3 Replies