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 |
What is basename in shell script?
Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.
c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l
What is INODE?
What are the additional egrep symbols?
Why should we use shell scripts?
How to take input values from the user?
How to get the first line from a file using just the terminal?
What will happen to my current process when I execute a command using exec?
What does chmod do?
how is the oppurtunities for unix in the software
What are the Different types of shells?