The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Hardware > Filesystems, Disks and Memory
.
google unix.com



Filesystems, Disks and Memory Discuss NAS, SAN, RAID, Robotic Libraries, backup devices, RAM, DRAM, SCSI, IDE, EIDE topics here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
deleting older directories dnat UNIX for Dummies Questions & Answers 9 01-16-2008 02:59 AM
deleting all the sub directories pavan_test UNIX for Dummies Questions & Answers 2 01-26-2006 10:52 PM
Recursively deleting directories mikeshank UNIX for Dummies Questions & Answers 4 11-26-2004 11:58 AM
Deleting unamed directories gseyforth UNIX for Dummies Questions & Answers 4 10-20-2003 03:05 PM
deleting nfs directories... piltrafa UNIX for Dummies Questions & Answers 3 01-30-2003 12:33 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-10-2006
amacgeek amacgeek is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 1
Question deleting directories from a list

I have a need to remove a bunch of old user home directories from my
OS X server. Using BASH and ls, I've been able to redirect the directory structure to a file with 'ls -l >userslist'. I've then manually sifted through the list for directories whos owner doesn't match the a given directory name (I'm
sure I could have used grep to filter this for me but hey, that's why I'm here asking questions! I'm new to these tools.)

Anywhoo, what I want to do now is take this list of names and pipe it
into 'rm' to delete them. Which command would read my list line by line to stream into a pipe over to 'rm' to delete each directory? This is a simple one for most UNIX admins I'm sure and I could just do this with the GUI but I'm forcing myself to remove the training wheels.

Any takers? Thanks in advance.

Julius
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0