Create a bash shell script that removes all files whose
names end with a "~" from your home directory and
subdirectories. Name this script "cleanup.sh"
Answer Posted / alok
find . -name *~ -exec rm -i {} \;
It will ask you before deletion of this file
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What is the use of echo in shell script?
Is it possible to substitute "ls" command in the place of "echo" command?
Is bash an operating system?
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
What is wc in shell script?
What is shell chemistry?
What is the significance of $#?
What are zombie processes?
What is the first line in every perl script called?
How can the contents of a file inside jar be read without extracting in a shell script?
What are the types of script?
i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..
I have 2 files and I want to print the records which are common to both.
What is another name for a bash shell script that you might see?
How do we create command aliases in a shell?