Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-14-2004, 02:28 AM   #1
Registered: Jul 2003
Location: manila
Distribution: slackware 8 to 9
Posts: 199

Rep: Reputation: 30
selecting specific files

hi! a couple of years i just write in this forum a question how do i command a single command to select a multiple files and then deleting it. someone answer to my given question and it work just great now i need it once more my problem i lost my note last year i need it badly to select thousand garbage file like.... *.bak *.tmp etc. hope someone may help me again thks in advance.

ex. rm *.bak then deleting all that have bak extension file.

Last edited by slack66; 02-14-2004 at 02:29 AM.
Old 02-14-2004, 07:52 AM   #2
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96

Try this:

$ rm -f *.tmp .*.tmp *~ .*~ *.BAK .*.BAK *.bak .*.bak '#'*'#'

That will remove most common backup types from your current directory.

If you need to delete all backup files in all folders below the current one:

$ find -name *.bak -print0 | xargs -0 rm

will remove all .bak files from the current directory and any directories in the current one.


P.S. I'm not responsible for data lost through using these commands.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting files in konqueror freezes system registering Mandriva 2 06-07-2005 09:53 AM
XMMS not selecting files suro Fedora 1 03-26-2005 03:25 PM
Removing specific files twantrd Linux - General 3 03-01-2004 04:49 PM
Filesystem/Specific Files clearh20 Linux - Newbie 1 05-31-2003 05:19 PM
NEdit 5.3: Selecting Files to Edit DavidMD Linux - Software 0 05-19-2003 02:01 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:33 PM.

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