Remove backup files ending with “~” from your system.
Filed under: , — 4 Comments May 1, 2013 Many text editors create backup files with names ending with “~”.
Most of the times these files are annoying and unnecessary … So, you can use the following piped commands to remove them : find / | grep “^.*~$” | sed -e ‘s/\(^.*$\)/”\1″/g’ | xargs rm -f > /dev/null 2>&1 Please take account that this version handles correctly also filepaths containing space characters.
Rate this:.
Share this:.
Click to share on Facebook (Opens in new window).

Click to share on LinkedIn (Opens in new window)

Click to share on Twitter (Opens in new window)

Click to print (Opens in new window)

Click to email this to a friend (Opens in new window)

Like this:.
Like Loading.
Related.
Tags: clean backup files, , , grep, , sed, .

Xargs Comments RSS feed 4 Comments:

E.
Chatzikyriakidis May 7, 2013 at 16:25 The approach of P.
Christeas as I have written is only for GNU find version which probably is located in a GNU/Linux operating system .
However, .

The article is more general since there is no reference to GNU operating systems (e.g

GNU/Linux, GNU/Hurd).

Evaggelos Balaskas May 7

2013 at 12:16 Dude… P.
Christeas approach is the correct method.

If find missing delete then its not a GNU/Linux distro

E.
Chatzikyriakidis May 1, 2013 at 17:25 There are many ways to achieve this.
I didn’t want to use ‘-delete’ since this option might be missing from some versions of ‘find’.

We could use also ‘-exec rm’ but both ‘-delete’ and ‘-exec’ are for GNU find

Other versions might not have these smart options yet.
P.
Christeas May 1, 2013 at 16:59 find -name ‘*~’ -delete.
Leave a Reply Cancel reply.
Enter your comment here.
Fill in your details below or click an icon to log in:.
Email (Address never made public) Name Website You are commenting using your WordPress.com account.
( Log Out /   ) You are commenting using your Google account .
( Log Out /   ) You are commenting using your Twitter account.
( Log Out /   ) You are commenting using your Facebook account.
( Log Out /   ) Cancel Connecting to %s Notify me of new comments via email.
Notify me of new posts via email.
« You Came.

LISP function for inserting the GNU GPL v3 in Emacs

».
(79).
(21).
(15).
(26).
(4).
(7).
(55).
(24).
(4).
(16).
(14).
(4).
(7).
(10).
(78).
(11).
(9).
(1).
May 2013 M T W T F S S  12345 6789101112 13141516171819 20212223242526 2728293031   « Mar Jun ».
(2).
(4).
(1).
(1).
(2).
(1).
(1).
(1).
(2).
(1).
(9).
(1).
(8).
(1).
(1).
(2).
(4).
(7).
(1).
(1).
(1).
(8).
(12).
(1).
(2).
(1).
(2).
(1).
(2).
(1).
(1).
(4).
(20).
(13).
(5).
(2).
(10).
(13).
(10).
(10).
(20).
287,006 hits.
Send to Email Address Your Name Your Email Address Cancel Post was not sent – check your email addresses.
Email check failed.

Please try again Sorry

your blog cannot share posts by email.
%d bloggers like this:.