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"
Answers were Sorted based on User's Feedback
Answer / alok
find . -name *~ -exec rm -i {} \;
It will ask you before deletion of this file
Is This Answer Correct ? | 6 Yes | 2 No |
Answer / kuldeep singh
#!/bin/sh
cd | ls -lR | grep "~$" | rm -f
Is This Answer Correct ? | 1 Yes | 4 No |
What are filters explain sort with all the options available?
Explain about debugging?
How to make userdefined variables to available for all other shells?
How to initialize a directory size to a variable??
How to group the commands in shell scripting?
What is shell prompt?
What does it mean to debug a script?
What is console line?
What is a shell made of?
What is computer cli?
How to know that your remote server is ruing smoothly or not in unix?
What language is used in terminal?