LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 06-29-2004, 04:48 PM   #1
BlueOrb
Member
 
Registered: Feb 2004
Distribution: Debian 3.1 "sarge"
Posts: 31

Rep: Reputation: 15
Having rm or mv take file input


how can i get rm to take a file input? i have a text file with a bunch of paths in it, but how do i get rm or mv to do their stuff to the files instead of to the text file itself?
 
Old 06-29-2004, 04:53 PM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Code:
[user@domain ~]$ rm < filename
this should do the trick
 
Old 06-29-2004, 06:15 PM   #3
BlueOrb
Member
 
Registered: Feb 2004
Distribution: Debian 3.1 "sarge"
Posts: 31

Original Poster
Rep: Reputation: 15
nah, im not that n00bish tried that it says for rm too few args and for mv missing file arg...
 
Old 06-29-2004, 09:40 PM   #4
iulius
LQ Newbie
 
Registered: Jun 2004
Posts: 1

Rep: Reputation: 0
xargs

You need to use xargs to split the file into separate tokens, each with its own call to rm.

Like so:
Code:
xargs rm -f < thefile
 
Old 06-29-2004, 09:42 PM   #5
BlueOrb
Member
 
Registered: Feb 2004
Distribution: Debian 3.1 "sarge"
Posts: 31

Original Poster
Rep: Reputation: 15
alright ill try that thanks guys!
 
  


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
File Input, how to get number of items? ftgow Programming 1 03-11-2005 01:31 AM
PHP: No input file specified pembo13 Linux - General 0 10-03-2004 09:49 PM
C++ binary file input CamelofCamelot Programming 1 12-28-2003 06:38 PM
input file to htpasswd igcsteve Linux - Newbie 4 06-05-2003 12:54 PM
input from a file ?? FredrikN Programming 5 03-30-2002 12:53 AM


All times are GMT -5. The time now is 04:37 PM.

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