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 to calculate the number of passed arguments?
How do you debug a script?
Is cmd a shell?
How to create environment variables?What are the conditions for creating variables?
what are command line arguments? what is the need of those?
What are the different variables present in linux shell?
How can you get the value of pi till a 100 decimal places?
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
How to open a read-only file in the shell?
What is the command for " how many shell is running in your system or how many shell supported by your system " ?.
Is shell and terminal the same?
What is k shell?