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 |
Write a command sequence to find the count of each word?
write a non recursive shell script that accepts any number of arguments and prints them in the reverse order
How will you print the login names of all users on a system?
Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.
How shell works?
What will happen to my current process when I execute a command using exec?
What is web script?
How do I read a .sh file?
What is the difference between break and continue commands?
When should shell programming/scripting not be used?
What is k shell?
write a shell program to check wheather a given string is pallindrome or not?