LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices

Reply
 
Search this Thread
Old 12-25-2006, 10:25 PM   #1
mahabooba
Member
 
Registered: Dec 2005
Posts: 43

Rep: Reputation: 15
Regarding Background process.


Hi

I have a file in unix which has got around 5million records

when i do the cat on the file, it is going to list all the 5m records

but what i wanted to do is, after listing the 25,000 records, the command should run in the background.

which means, as soon as the listing of record reaches more than 25k , this command shud be put in background until it reaches end of record

can any one plz help me out with the unix sytax/command that does this.

--

--
thanks n advance
Ali
 
Old 12-26-2006, 02:20 PM   #2
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 230Reputation: 230Reputation: 230
  • What is the context?
  • Why do you want to do this?
  • What are you trying to accomplish?
    (There may be an easier way to attain your goal.)

Would using less rather than cat be of any help?
 
Old 12-26-2006, 03:02 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
If you're not doing anything with the records you can use head:
Code:
head --lines=25000 /var/log/messages
Otherwise archtoad6 is right, more info is needed...
 
Old 12-26-2006, 04:05 PM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 230Reputation: 230Reputation: 230
BTW, that can be simplified to:
Code:
head -25000 <filename>
And please, the add'l info . . .
 
  


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
background process ust Linux - General 1 12-15-2005 11:35 PM
really background a process Henster Linux - Newbie 1 07-01-2005 05:29 AM
how to run any binary in background - background process tej Linux - Newbie 1 08-16-2004 12:27 AM
Background process h8r Linux - Newbie 5 01-13-2003 04:21 PM
background process gurra Programming 9 09-30-2001 01:31 PM


All times are GMT -5. The time now is 06:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration