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

Answer Posted / sreekanth turuka

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

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I open the shell in cmd?

533


Why are shell scripts used?

630


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

2118


Explain about sourcing commands?

644


How does ls command work?

592






Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.

578


What is option in shell script?

567


What is ms powershell?

597


How do I open the shell prompt?

584


What is awk in shell script?

764


What does sh mean?

626


What is a shell environment?

580


How to use arguments in a script?

594


What is the crontab?

552


What is the syntax of while loop in shell scripting?

577