LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-10-2014, 04:03 AM   #1
442632Mi
LQ Newbie
 
Registered: Mar 2011
Location: Manila, Philippines
Distribution: Ubuntu 14.04
Posts: 2

Rep: Reputation: 0
How to delete temp directory (Ubuntu 14.04)


Hi Guys, Good day!

I'm trying to delete temp directory on my back up files for years of storage (Ubuntu 14.04)

Executing this command,
Code:
find -iname '*.tmp' -exec rm {} \;
Got this error,
Code:
rm: cannot remove ‘./FileServer_2010_2011_2012/2010/operations_2010/IT/MSIb7230.tmp’: Is a directory
I know I got wrong syntax, might someone share the correct command.

TIA & Regards,
 
Old 10-10-2014, 04:07 AM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Have you tried rmdir
 
1 members found this post helpful.
Old 10-10-2014, 04:12 AM   #3
442632Mi
LQ Newbie
 
Registered: Mar 2011
Location: Manila, Philippines
Distribution: Ubuntu 14.04
Posts: 2

Original Poster
Rep: Reputation: 0
It's works!, thanks EDDY1 :-)

Code:
find -iname '*.tmp' -exec rmdir {} \;

Last edited by 442632Mi; 10-10-2014 at 04:21 AM. Reason: add details
 
Old 10-10-2014, 04:25 AM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
You're welcome.
Mark thread as solved using the thread tools above.
 
  


Reply


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
Should I delete temp files in Linux PatAland Linux - Newbie 2 06-30-2013 08:44 PM
Delete Temp Folder on Shutdown? Mr.Gosh SUSE / openSUSE 6 03-29-2010 09:33 PM
Delete temp files. caa1980 Ubuntu 6 03-29-2010 08:47 AM
delete temp file in linux Arjun123 Linux - Newbie 2 06-24-2009 01:18 AM
How To Delete temp Internet Files? agee220 Linux - Newbie 3 08-25-2004 03:36 PM


All times are GMT -5. The time now is 06:36 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration