|
| View previous topic :: View next topic |
| Author |
Message |
berkbw
|
Posted: Sat Dec 22, 2007 8:49 pm Post subject: nano - hmmmm |
|
|
A couple of days ago, I was looking to edit some small text file quickly. So, I invoked nano. Nothing.. Oh, well, I have a bunch of stuff that does that. Today, I noticed that BOINC wasn't running - and couldn't run the cpu benchmark. So - I ran top, and 'lo and behold - nano uspng 94% of cpu!!. Killed it and allwas well after.
b-
|
|
|
 |
john maclean
|
Posted: Sun Dec 23, 2007 11:45 am Post subject: |
|
|
Did you edit a file with nano a while ago and forget to close that editing session? you can use `top` and look for for that process or use `pgrep nano` example Means that scp is running on this box with a process number as shown.
|
_________________ BLAG 'em up! |
|
 |
jebba
|
Posted: Sun Dec 23, 2007 6:43 pm Post subject: |
|
|
jayeola i love how you find every obscure command. How handy. Sheez, I can't believe the endless world of unix... I just realized you can do `grep --color foo bar` the other day...
|
|
|
 |
john maclean
|
Posted: Sun Dec 23, 2007 8:41 pm Post subject: |
|
|
This is a one-liner I wrote some time ago to help me out when choosing what modules to include in a kernel
| Code: | | while true; do read -p "kernel module : " ASK; grep -i $ASK --colour=always /boot/config-$(uname -r) ; done |
The word "colour" depends on your locale and the rest depends if you are using a config-foo file for the running kernel.
The output looks like this:- http://www.jayeola.org/dump/ss-forum-1-colour-grep.png Feed the script with "sensible names" like alsa, snd, intel or any other names that you see in the linux tree.
|
_________________ BLAG 'em up! |
|
 |
jebba
|
Posted: Sun Dec 23, 2007 8:52 pm Post subject: |
|
|
Of course using --colour in your example doesn't show the color change since you are also using red as your main text. That created a huge blob of ERT (evil red text). ;)
-Jeff
|
|
|
 |
john maclean
|
Posted: Sun Dec 23, 2007 8:56 pm Post subject: |
|
|
Check it out now ;-)
|
_________________ BLAG 'em up! |
|
 |
|
|
|