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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
08-21-2002, 09:44 PM
|
#16
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
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.
|
|
|
|
08-22-2002, 03:28 AM
|
#17
|
|
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:
|
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 
|
|
|
|
08-22-2002, 03:32 AM
|
#18
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
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!
|
|
|
|
08-22-2002, 04:12 AM
|
#19
|
|
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:
|
well anybody know if this would work send a stamped self addressed envelop to blue peter... ummm or even just reply here please 
|
|
|
|
08-22-2002, 07:04 AM
|
#20
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
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.
|
|
|
|
08-22-2002, 07:25 AM
|
#21
|
|
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:
|
Sorry MasterC Yes it would Blue Peter is a Long running Kids Show that all children in the UK grow up watching.
|
|
|
|
08-22-2002, 06:16 PM
|
#22
|
|
Senior Member
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345
Rep:
|
[drools]
And some Uni students still watched whilst Katie Hill was presenting.
[/drools]
|
|
|
|
08-23-2002, 07:54 AM
|
#23
|
|
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:
|
Ohh yes especially with her infamous leopard skin mini skirts..........
mmmmmm sweet...............
|
|
|
|
08-23-2002, 07:54 AM
|
#24
|
|
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:
|
Katie Hill was the best ever presenter of Blue Peter
|
|
|
|
08-23-2002, 05:25 PM
|
#25
|
|
Senior Member
Registered: Oct 2001
Location: Bristol UK
Distribution: Arch Ubuntu Slackware
Posts: 1,026
Rep:
|
...has nobody even heard of Valerie Singleton? Who is this Katie Hill?
|
|
|
|
08-23-2002, 07:09 PM
|
#26
|
|
Member
Registered: May 2002
Location: The good 'ol USofA
Distribution: ArchLinux - Slackware 8.1
Posts: 398
Rep:
|
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.
|
|
|
|
08-23-2002, 11:12 PM
|
#27
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
he he he, thanks  I learned that one from my first attempt at LFS.
|
|
|
|
08-24-2002, 08:47 AM
|
#28
|
root 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 9,588
|
Please keep the threads in Website Questions & Suggestions on topic. I am moving this to General so the thread can continue. Thanks.
--jeremy
|
|
|
|
08-26-2002, 07:36 PM
|
#29
|
|
Senior Member
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345
Rep:
|
Katie Hill? Check out the Dave Grantham ladies site (non-porno). Or here.
|
|
|
|
08-26-2002, 09:24 PM
|
#30
|
|
LQ Addict
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search 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
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:17 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|