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 |
How do I run a shell script on a mac?
What is a shell? · Types of shell · what is shell scripting?
what are command line arguments? what is the need of those?
What is shell terminal?
What are the 3 standard streams in linux?
what is the difference between sh & bash shell?
Why we are writting shell scripts? Plz if possible explain it briefly.
What are scripts in psychology?
what is info area how many types?
I want to read all input to the command from file1 direct all output to file2 and error to file 3, how can I achieve this?
What is awk in shell script?
What is shell geeksforgeeks?