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 |
Explain about sourcing commands?
What is the use of .sh file?
In a file , how to retrieve the lines which are the multiples of 50 ? like 50,100,150th lines etc.
How are shells born?
What is bash command used for?
What does $0 mean in shell script?
c program to check whether all the directories in the path exists has read and write permission
How can you get the value of pi till a 100 decimal places?
Write a shell script to looking at the log file to see if the test has passed or not
What are the different commands available to check the disk usage?
write a shell script to check whether all the directories in the path exist has read and write permission
How to pass an argument to a script?