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"

Answer Posted / stevemc

#!/bin/bash

cd ~

find . -name "*~" | xargs rm

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to calculate the number of passed arguments?

550


What is an inode block?

575


What is the purpose of scripting?

573


What is the difference between break and continue commands?

566


Why is it called a shell?

503






What is a shell script in windows?

583


Explain about debugging?

605


What are the various stages of a linux process it passes through?

624


What does egrep mean?

568


What does chmod do?

570


Explain about the exit command?

566


What is shell environment?

544


Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

1705


What is the default ubuntu terminal?

611


Write a script to print the first 10 elements of fibonacci series.

1758