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 is the syntax of "expr" command?
How to get the last line from a file using just the terminal?
What is shell geeksforgeeks?
one folder contains lot of students name but I want to fetch hello with every student name individually using shell script
how to read systems current date and time
write a program to display all the files from the current directory which are created in particular month
Explain about "s" permission bit in a file?
What is sudo command?
How to write a function?
Calculate a real number calculation directly from the terminal and not any shell script.
What is computer cli?
How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?