LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to delete temp directory (Ubuntu 14.04) (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-delete-temp-directory-ubuntu-14-04-a-4175521656/)

442632Mi 10-10-2014 03:03 AM

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. :D

TIA & Regards,

EDDY1 10-10-2014 03:07 AM

Have you tried rmdir

442632Mi 10-10-2014 03:12 AM

It's works!, thanks EDDY1 :-)

Code:

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

EDDY1 10-10-2014 03:25 AM

You're welcome.
Mark thread as solved using the thread tools above.


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