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 |
why did you apply to shell
write a shell program to check wheather a given string is pallindrome or not?
What is path in shell script?
What are the advantages of bash over all other shells?
How to debug the problems encountered in the shell script/program?
What is the difference between running a script as ./scriptname.sh and sh scriptname.sh
How do you find out What is your shell?
What is sh in shell script?
What is shell variable?
How can you get the value of pi till a 100 decimal places?
How do you print the output the same string which is typed in command line. how do you write the shell script or command for this. if i entered "Hello" in command line, it should print 'Hello', if i say "Hello Welcome", i should get the "Hello Welcome" as output.?
Write down the syntax of "for " loop