Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



how to delete all the files with extension .dat rom a directory tree from root to third level in a..

Answer / vipul dalwala

find . -name *.dat -maxdepth 3 -exec rm -f {} \;

Is This Answer Correct ?    10 Yes 0 No

how to delete all the files with extension .dat rom a directory tree from root to third level in a..

Answer / sreekanth turuka

grep -l "*.dat" /dir1/dir2/dir3 | rm

Is This Answer Correct ?    0 Yes 0 No

how to delete all the files with extension .dat rom a directory tree from root to third level in a..

Answer / saravanan

rm `find -maxdepth 2 -name *.dat`

Is This Answer Correct ?    0 Yes 0 No

how to delete all the files with extension .dat rom a directory tree from root to third level in a..

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

Post New Answer

More Shell Script Interview Questions

why did you apply to shell

3 Answers   Shell,


write a shell program to check wheather a given string is pallindrome or not?

4 Answers  


What is path in shell script?

0 Answers  


What are the advantages of bash over all other shells?

1 Answers  


How to debug the problems encountered in the shell script/program?

0 Answers  


What is the difference between running a script as ./scriptname.sh and sh scriptname.sh

1 Answers  


How do you find out What is your shell?

0 Answers  


What is sh in shell script?

0 Answers  


What is shell variable?

0 Answers  


How can you get the value of pi till a 100 decimal places?

0 Answers  


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.?

3 Answers   IBM, Symphony,


Write down the syntax of "for " loop

0 Answers  


Categories