LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-13-2005, 04:45 PM   #1
hallamigo
Member
 
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230

Rep: Reputation: 31
Shell script to remove backup ~ files


Not sure if this would be a combination of grep and rm, but I'd like to be able to run a script that scans all files in a directory and any directory under it to remove backup files.

ie. index.html~ or filename.txt~ - anything with a ~ as the last character ...

Any help on this shell script would be much appreciated.

Thanks.
 
Old 06-13-2005, 05:00 PM   #2
dub.wav
Member
 
Registered: Aug 2003
Location: Norway
Distribution: FC4
Posts: 83

Rep: Reputation: 20
find . -name '*~' -exec rm {} \;
 
Old 06-13-2005, 08:32 PM   #3
hallamigo
Member
 
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230

Original Poster
Rep: Reputation: 31
Great, that works perfectly - thanks!
 
Old 09-13-2010, 03:47 PM   #4
lanka
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
remove bakups

Hi there, i used tht ssh but seems nothing happen, where the error?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to remove old files based on date WindozBytes Linux - General 12 06-04-2012 01:21 AM
Shell Script for backup BBQ_Matt Linux - Software 7 06-30-2005 05:19 PM
Incremental Backup shell script. datadriven Linux - General 3 06-02-2004 09:19 AM
writting a backup shell script yenonn Slackware 2 03-18-2004 07:49 PM
bash shell backup script turnip Programming 0 04-03-2003 06:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration