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

What is the purpose of scripting?

571


Write a command sequence to find the count of each word?

536


What is in a script?

562


What are the four fundamental components of every file system on linux?

1157


Is powershell a language?

556






What is wc in shell script?

553


What are the various stages of a linux process it passes through?

623


What can you do with powershell?

599


What is shell chemistry?

530


Why should we use shell scripts?

582


How does path variable work?

542


Why do we write bin bash in shell scripts?

539


How can you find out how long the system has been running?

524


What does $0 mean in shell script?

552


I want to connect to a remote server and execute some commands, how can I achieve this?

568