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 shell and shell script?
What is echo in shell?
how to search for vowels a,e,i,o,u appearing in the same sequence in a file
What is shell environment?
What are scripts in psychology?
Write a shell script to check whether a number is Armstrong number or not?
There is a record with fields namely name,roll no.,salary,grade etc.Now,write a script to create a file with multiple records have same combination of fields but with unique roll numbers.The script should work for different names in the input file.
What is the basic difference you find between a shell script and perl?
Explain about non-login shell files?
What are the advantages of shell scripting?
Is powershell a bash?
How can I set the default rwx permission to all users on every file which is created in the current shell?