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 / vipul dalwala

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

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.

796


What shell is bin sh?

719


What is echo in shell?

868


What is @echo off?

774


How to find all the files modified in less than 3 days and save the record in a text file?

847


What is shift command in shell script?

741


c program to display the information of given file similar to givan by the unix or linux command ls -l

1939


Is shell and terminal the same?

810


What is meant by $1 in shell script?

734


What is web script?

792


What is mac default shell?

819


How do we delete all blank lines in a file?

804


What are the zombie processes?

743


Tell something about the super block in shell scripting?

801


What are the two files of crontab command?

873