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 |
How to find all the files modified in less than 3 days and save the record in a text file?
What is subshell?
What is awk in shell scripting?
What is Path variable?What is its use?
Explain about sourcing commands?
The information of the two files should be redirect to Third file in such a way that, the third file contain the information like this. 1st line in third file should be from 1st file 2nd line in Third file should be from 2nd file 3rd line in Third file should be from 1st file 4th line in Third file should be from 2nd file - - so on
What is c in shell script?
c program to display the information of given file similar to givan by the unix or linux command ls -l
What is shell and terminal?
What is the significance of the shebang line in shell scripting?
How will you schedule a job that will run every month last day?(some months have 30 days,some 31 days,28,29 days)
What is sh in shell script?