Reply
Thread Tools
Posts: 889 | Thanked: 537 times | Joined on Mar 2010 @ scotland
#11
apt-get moo

its not mine! but it rocks!

have you moo'ed today?
__________________
sarcasm may be the lowest form of wit, but its the only wit i have.

its a sad day when i can't slip at least one hitchhiker reference in somewhere.
 
Posts: 61 | Thanked: 21 times | Joined on Jan 2010
#12
Originally Posted by dannym View Post
Actually, files whose names start with "." in the root directory of the filesystem tree will stay then.
No, *nix isn't windows and it doesn't know anything like "name.extension" the dot is simply part of the name with no difference from any letter so * actually means 'all the files'
 
Posts: 1,258 | Thanked: 672 times | Joined on Mar 2009
#13
* is interpreted by the shell though. I guess what dannym meant was that it would leave out "hidden" files, or files starting with a dot.
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#14
Originally Posted by BlackDiamond View Post
the dot is simply part of the name with no difference from any letter so * actually means 'all the files'
Nope, try "echo *" and "echo *.*" in $HOME for instance and/or see glob(7).
 

The Following User Says Thank You to lma For This Useful Post:
Posts: 486 | Thanked: 251 times | Joined on Oct 2009
#15
Originally Posted by timoph View Post
I'll start with something rather simple to get this going.

Code:
echo `head -2 < /proc/meminfo | awk '{print $2}' | sort -n` | awk '{printf("You have $1 kb of $2 kb free memory")}'
The above can be simplified even more by omitting the "<" after the "head -2", omitting the " | sort -n", and swapping $1 and $2.

(Of course, the $n must be replaced with %i, and listed after the output string, as mentioned by fnordianslip above.)
__________________
The Mini-USB plug is an improvement over both the Type B plug and the Micro-B plug.

Last edited by j.s; 2010-08-21 at 18:23. Reason: corrected typographic error (> to <)
 

The Following User Says Thank You to j.s For This Useful Post:
Posts: 515 | Thanked: 266 times | Joined on Nov 2009 @ Oelsted, Denmark
#16
Search for <phrase> in all files below <path> (Recursive):

Code:
grep -R <phrase> /<path>
I.e. search for files containing the word N900 in the MyDocs folder:
Code:
grep -R N900 /home/user/MyDocs
EDIT - Adding -i would do the same, only incase sensitive.
__________________
Christian Wilken - tux-POWER.dk!
... May the Source be with You ...

Last edited by DrWilken; 2010-08-21 at 18:30.
 
Posts: 490 | Thanked: 191 times | Joined on May 2010
#17
I wanted to write cat /dev/urandom > /dev/dsp ,but it doesn't work on n900

on ubuntu, it sends random symbol to speakers and so you hear the "white noise"

Last edited by aligatro; 2010-08-21 at 23:07.
 
giannoug's Avatar
Posts: 334 | Thanked: 171 times | Joined on Dec 2009
#18
Originally Posted by aligatro View Post
I wanted to write cat /dev/urandom > /dev/dsp ,but it doesn't work on n900

on ubuntu, it sends random symbol to speakers and so you hear the "white noise"
Hmm... /dev/dsp is the DSP and not the sound module, I think.
 
Posts: 515 | Thanked: 266 times | Joined on Nov 2009 @ Oelsted, Denmark
#19
Originally Posted by giannoug View Post
Hmm... /dev/dsp is the DSP and not the sound module, I think.
Then doing it as root should give *some* kind of (visual) output...
__________________
Christian Wilken - tux-POWER.dk!
... May the Source be with You ...

Last edited by DrWilken; 2010-08-21 at 23:39.
 
Posts: 61 | Thanked: 21 times | Joined on Jan 2010
#20
Originally Posted by lma View Post
Nope, try "echo *" and "echo *.*" in $HOME for instance and/or see glob(7).
My bad! I misread what the man said. (And forgot about .* hidden files.)
Btw *.* won't catch files or directories without 'in middle' dot.

Last edited by BlackDiamond; 2010-08-21 at 23:46.
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:46.