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 / somnath

#!/bin/bash

find /home -name "*~" | xargs rm

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between shell and bash scripting?

551


Is shell and terminal the same?

593


What is a shell made of?

561


Can you write a script to portray how set –x works?

557


How do I edit a .sh file?

629






What is the lifespan of a variable inside a shell script?

1129


write a shell script to check the failed jobs?

3961


How can I set the default rwx permission to all users on every file which is created in the current shell?

912


Explain how you Automate your application using Shell scripting.

1854


What are the different variables present in linux shell?

614


What is the fastest scripting language?

554


Explain about login shell?

638


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?

720


c program which behaves like a shell(command interpreter). it has its own prompt say "NewShell$".any normal shell command is executed from your shell by starting a child process to execute a system program corrosponding to the command

4695


Is it possible to substitute "ls" command in the place of "echo" command?

619