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 |
Explain about gui scripting?
c program to display the information of given file similar to givan by the unix or linux command ls -l
Which is better perl or shell scripting?
Is cmd a shell?
How do I open the shell in cmd?
How will you connect to a database server from linux?
Hi, i want to zip the files that generates automatically every few minutes (files generated are in .arc extension)....any body write a script for this... thanks in advance
What are the different shells available?
What happens when you type ls?
How will you pass and access arguments to a script in linux?
What is the conditional statement in shell scripting?
How do I run a .sh file?