how to delete all the files with extension .dat rom a
directory tree from root to third level in a single unix
command?
Answers were Sorted based on User's Feedback
Answer / vipul dalwala
find . -name *.dat -maxdepth 3 -exec rm -f {} \;
Is This Answer Correct ? | 10 Yes | 0 No |
Answer / lakshman
1st find the .dat file and place in file
example :
find . -name *.date > temp
then add rm infrent of paths in that file adn run the script.
example :
:%s/\.\//rm \.\//
open temp file run above vi command and rm the script
example :
sh temp
Is This Answer Correct ? | 0 Yes | 1 No |
Hi All, Is it possible to create one file name only space or space in file name in UNIX and we can able to run that on Unix?
Explain about sourcing commands?
What are the zombie processes?
What are the three main forms of enabling debugging in a shell script?
Is powershell a bash?
How to get the first line from a file using just the terminal?
write a shell script to check whether all the directories in the path exist has read and write permission
Write down the syntax for all the loops in shell scripting.
How to write an Auto scripting for deleting old files using shell script and made a cron job to run on daily basis
How to handle the delimiter unit seperator in Unix
How do I run a script from command prompt?
Create a bash shell script that reads a line from the user consisting of 5 words and then prints them out in reverse order. Name this script "reverse.sh"