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

What is the best scripting language?

570


What is the default ubuntu terminal?

627


How do you create a shortcut in linux?

601


c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again

5272


What language is bash?

498






How important is shell scripting?

553


What is bash coding?

507


Determine the output of the following command: [ -z “” ] && echo 0 || echo 1

564


What is shell prompt?

568


Write a shell script to get current date, time, user name and current working directory.

648


Why should we use shell scripts?

599


What is the first line of a shell script called?

581


What is @echo off?

571


How to write a function?

604


What is the equivalent of a file shortcut that we have a window on a linux system?

612