10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I want to delete all empty directories in a long directore tree structure. I want to use that from a script that will run on HP-UX 11. My definition of empty directory is that there is no regular file under it and directly beneath it. To elaborate, I have below directories.
/app/dev/java... (14 Replies)
Discussion started by: asutoshch
14 Replies
2. Shell Programming and Scripting
Hi all,
I have a folder hierarchy with many gz files in them. I would like to recursively decompress them, but keep the original files. I would also like to move all the decompressed files (these are very large HDF5 files with .CP12 extension) to another data folder.
Currently I am using four... (3 Replies)
Discussion started by: gansvv
3 Replies
3. UNIX for Dummies Questions & Answers
I would like to delete all files but keep all the .JPG files.
How can this be accomplished?
Thanks in advance (8 Replies)
Discussion started by: Xterra
8 Replies
4. UNIX for Advanced & Expert Users
Hi All,
We have a requirement to recursively delete the directories and its subdirectories older than 60 days based on timestamp (folder creation timestamp)under certain directory. However it has some specific requirements.
The directories will continue to be there upto any depth.
the... (0 Replies)
Discussion started by: rcvasu
0 Replies
5. Shell Programming and Scripting
Hi, Dear all:
One question ! ^_^
I'm using bash under Ubuntu 9.10.
My question is not to rename all ".JPG" files to ".jpg" in a single folder, but to rename all ".JPG" files to ".jpg" in all subfolders.
To rename all ".JPG" to ".jpg" in a single folder,
for x in *.JPG; do mv "$x"... (7 Replies)
Discussion started by: jiapei100
7 Replies
6. 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
7. Shell Programming and Scripting
Recently all of the php files on my server got injected with some dating site code and I'm trying to get rid of it all at once. I've tried using sed but I don't know how to escape it correctly because I don't really know what I'm doing. Could you guys help me with the syntax?
find ./* -type f... (2 Replies)
Discussion started by: ISOcrates
2 Replies
8. Shell Programming and Scripting
i have 200000bytes size of a unix file i need to delete some text between two strings recursively using a loop with sed or awk . these two strings are : 1st string getting from a file :::2 nd string is fi...its constant . can anyone help me sed -n'/<1 st string >/,/fi/' <input_filename> is the... (2 Replies)
Discussion started by: santosh1234
2 Replies
9. Shell Programming and Scripting
I have to write a shell script which can delete all the files and directories recursively inside the specified directory but should not delete the specified directory.
Please some body help me in writing the script. (3 Replies)
Discussion started by: deepthi.s
3 Replies
10. Shell Programming and Scripting
sorry guys can some please give me a hint how to achieve this in a slick oneliner?
delete files older than 5 minutes in specified directory (recursively)
peace (3 Replies)
Discussion started by: scarfake
3 Replies