LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-21-2002, 09:44 PM   #16
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69

Thanks, an obvious one to some, but good for the newbs

Ever want to run multiple commands and go watch some TV while the numbers crunch (like while building a new kernel?)

The && command is your friend.

Example for kernel
make dep &&
make clean &&
make modules &&
make modules_install &&
make bzImage
And press enter, all command will execute, and after each finishes the next will start, if there were no errors from the first command ran. Now you don't have to sit there until make dep finishes to move on.
 
Old 08-22-2002, 03:28 AM   #17
dai
Member
 
Registered: May 2002
Location: Wales
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328

Rep: Reputation: 30
Yo Grand Master of the C

Couldnt you add those lines to a Script like this

#!/bin/sh

make dep &&
make clean &&
make modules &&
make modules_install &&
make bzImage


and call it compilekern.sh

then run this script and it would do it automatcally????

Yes Im lazy
 
Old 08-22-2002, 03:32 AM   #18
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
he he he, even though my name may represent something in programming language, I really have no idea about scripting, so, if it works, then, yeah. But I have no idea. That's a good idea if it does though, and you wouldn't really need the && I believe. The script usually will wait until one thing is done to perform the next operation anyway I believe, so the && would be extra/un needed. But again, I don't know scripting, and this would only help with the kernel, where the && can be used anywhere you have to run more than 1 command after another.

Good idea though, thanks!
 
Old 08-22-2002, 04:12 AM   #19
dai
Member
 
Registered: May 2002
Location: Wales
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328

Rep: Reputation: 30
well anybody know if this would work send a stamped self addressed envelop to blue peter... ummm or even just reply here please
 
Old 08-22-2002, 07:04 AM   #20
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
I don't understand that one dai? SASE to Blue Peter? I am not following? Would this be a "UK" thing? Thanks for any clarification.
 
Old 08-22-2002, 07:25 AM   #21
dai
Member
 
Registered: May 2002
Location: Wales
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328

Rep: Reputation: 30
Sorry MasterC Yes it would Blue Peter is a Long running Kids Show that all children in the UK grow up watching.
 
Old 08-22-2002, 06:16 PM   #22
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
[drools]
And some Uni students still watched whilst Katie Hill was presenting.
[/drools]
 
Old 08-23-2002, 07:54 AM   #23
dai
Member
 
Registered: May 2002
Location: Wales
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328

Rep: Reputation: 30
Ohh yes especially with her infamous leopard skin mini skirts..........

mmmmmm sweet...............
 
Old 08-23-2002, 07:54 AM   #24
dai
Member
 
Registered: May 2002
Location: Wales
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328

Rep: Reputation: 30
Katie Hill was the best ever presenter of Blue Peter
 
Old 08-23-2002, 05:25 PM   #25
esteeven
Senior Member
 
Registered: Oct 2001
Location: Bristol UK
Distribution: Arch Slackware Ubuntu
Posts: 1,082

Rep: Reputation: 52
...has nobody even heard of Valerie Singleton? Who is this Katie Hill?
 
Old 08-23-2002, 07:09 PM   #26
Goatdemon
Member
 
Registered: May 2002
Location: The good 'ol USofA
Distribution: ArchLinux - Slackware 8.1
Posts: 398

Rep: Reputation: 30
anyone watch bananas in pajamas? or... anyone from hongkong, what's going on with that millenium tower. the discovery channel said that hongkong was planning to build one on a lake somewhere to house their citizens.

and masterc a very good tip indeed.
 
Old 08-23-2002, 11:12 PM   #27
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
he he he, thanks I learned that one from my first attempt at LFS.
 
Old 08-24-2002, 08:47 AM   #28
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
Please keep the threads in Website Questions & Suggestions on topic. I am moving this to General so the thread can continue. Thanks.

--jeremy
 
Old 08-26-2002, 07:36 PM   #29
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
Katie Hill? Check out the Dave Grantham ladies site (non-porno). Or here.
 
Old 08-26-2002, 09:24 PM   #30
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Original Poster
Rep: Reputation: 56
Ok guys and gals, back to the topic

- RENICE CPU HOGS

have you ever wanted to automatically force a process that uses up most of the CPU.

renice 20 `ps -augxww | sort -rn +3 -4 | head -1 | awk '{print $2}'`

Note: Check your 'ps' command. Your arguments may differ.

- NICE NOT SO NICE

Nice is nice, but it isn't so nice sometimes on foreground jobs. The reason, if the system gets really busy your terminal session could hang waiting to get more CPU time.
It is possible that killing the job becomes impossible on a very system, since the CPU may never give the process enough CPU time to recognize the kill signal waiting.
Using nice on an interactive program, like vi, could also be a bad idea.

So play nice, with nice.

- STAT FOR THE INODE

The stat command is available on newer flavors of Unix and linux to provide inode information about a file.

% stat /etc/hosts

File: "/etc/hosts"
Size: 1348 Filetype: Regular File
Mode: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Device: 3,2 Inode: 294992 Links: 1
Access: Tue Aug 21 15:06:19
2001(00000.00:00:00)
Modify: Wed Aug 30 09:19:35 2000(00356.05:46:44)
Change: Wed Aug 30 09:19:35 2000(00356.05:46:44)

It also provides other useful information about files.

- CUT FROM STANDARD COMMANDS

To properly cut the output of unix standard commands; such as ls, ps; and properly handle them without all the extra spaces, use this:

% ls -lt| tr -s " " | cut -f6-10
% ls -lt| tr -s " " | < --do what ever-- >

tr -s " " ==> here tr in effect removes all the extra formatting extra spaces introduced by unix shell, for display, and translates in to format easy to work with.

If we dont use this tr, then the -c option of cut will be unreliable because of varying size field lengths in the output and also -f option will be unreliable because of extra formatting delimiters.

ls -lt | tr -s " "
ps -ef | tr -s " "

gives us proper output to properly extract data or columns.

This tip generously supported by: snlmurthy@yahoo.com

All tips provided here is a courtesy of http://www.ugu.com Unix Guru Universe

Regards,
Boris.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wargame Hints? the_p0et Linux - Security 3 10-19-2003 11:04 PM
hints and tips bigjohn LQ Suggestions & Feedback 0 08-04-2003 01:48 PM
Slackware CUPS hints mi6 Slackware 3 06-05-2003 08:56 PM
Hints - process myquestion Programming 2 04-15-2002 07:26 PM
gcad hints ? jamaso Linux - General 0 03-02-2002 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:24 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
Open Source Consulting | Domain Registration