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 |
How do I start a shell script?
There are three departments A,B and C.Write a query to display the names of all the persons( in departments other than A) who are paid higher than the person receiving the lowest salary in DEPT A
what do u mean by $#,$* in unix programming?
What is Linux language details
Which is best institute for testing tool?
What is the fastest scripting language?
How will I insert a line "abcdef" at every 100th line of a file?
How do I run a script from command prompt?
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
How to take input values from the user?
What is the significance of $#?
Write the syntax for "if" conditionals in linux?