UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old August 19th, 2003, 12:26 PM
sqdProgrammer sqdProgrammer is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 2 sqdProgrammer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Removing files in UNIX

Hello,

1) I have a file with the names of the files inside.
2) I need to make the rm command to use that file as an input of files to delete.

Here is I what I tried but it did not work:

cat rm_list.txt > rm

It is probably a simple thing to do but I'm not very good with connecting I/O from commands yet.

Please show me how if you know

Reagards,
sqdProgrammer

Reply With Quote
  #2  
Old August 22nd, 2003, 02:52 PM
Prime Mover Prime Mover is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Jersey
Posts: 64 Prime Mover User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Almost had it right

Almost had it...

Uuse the following from the command line:

for x in `cat rm_list.txt`
do
rm $x
done

(Just in case you're not aware, those are ticks, the symbol on the same key as the tilde, not single quotes)

Let it run, your files will be gone.

Hope this helps.

-Gary

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Removing files in UNIX


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway