Go Back   The macosxhints Forums > OS X Help Requests > UNIX - Newcomers



Reply
 
Thread Tools Rate Thread Display Modes
Old 10-07-2012, 02:21 AM   #1
Hamo
Triple-A Player
 
Join Date: Feb 2006
Posts: 203
deleting the contents of a folder srm

Is there a way to delete the contents of a folder but not the folder itself when using srm?
Hamo is offline   Reply With Quote
Old 10-07-2012, 06:31 AM   #2
DeltaMac
League Commissioner
 
Join Date: Jan 2002
Posts: 7,960
I'm not quite understanding your challenge!

Is this a folder that you can't create again, once removed?
Or, are you asking about removing files completely from a hierarchy of folders, leaving only the empty folders still in place?
DeltaMac is offline   Reply With Quote
Old 10-07-2012, 06:41 AM   #3
Hamo
Triple-A Player
 
Join Date: Feb 2006
Posts: 203
What I want to do is delete all files that are inside of a specified folder.
So if we have 'Example Folder" I want to delete everything inside of it, but leave the actual folder remaining.
I think I have achieved this with:
Code:
srm path/to/Example\ Folder/*
Hamo is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump



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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.