delete all gedit backup files

by default gedit will maintain a copy of files being edited with the prefix ~.

it is irritating sometimes to have this files uploaded to the server. a simple way to delete this file will be

$find . -name *~ -exec rm '{}' \;

Advertisements

Published by

paragasu

Different. In a good way

2 thoughts on “delete all gedit backup files”

  1. I tried it and it didn’t work, until I realized you need to give bash a bit more data 😉

    find . -name ‘*~’ -exec rm -r ‘{}’ \;

    Without the ‘ and ‘ around *~ the shell expands the expression to something or other and it doesn’t find gedit backup files. the “-r” after “rm” was necessary on my system to make it go into subdirectories. Leave out if you DON’T want it to go anywhere except the current dir.

    1. well.. my mistake, i forgot to include the “-name” before the “*~”, it should be $find . -name *~ -exec rm -r ‘{}’ \; make sure you are on the current dir where you want to remove the files with ~ ending. thanks quixote 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s