Re: cd multiple levels up?

2010-06-14 Thread Greg Wooledge
On Sun, Jun 13, 2010 at 06:46:56AM -0500, Peng Yu wrote: > Hello, > > I frequently need do cd multiple levels up. For example, > > cd ../.. > cd ../../../../ > > It would be convenient to type something like "cd 2" or "cd 4". Is > there a command for this? You could write a function: cdup() {

Re: simple script to alert if internet not working?

2010-06-14 Thread Greg Wooledge
On Sun, Jun 13, 2010 at 06:53:48PM -0700, fuzzylogic25 wrote: > Problem is ping keeps gettin data requests nonstop from looks of it. so how > would i go about doing this? man ping If you're on most GNU/Linux systems (e.g. Debian) look for the -c switch. If you're on HP-UX 10.20, look for the -n

Re: new features to GNU Bash

2010-06-14 Thread mika . p . makinen
Hello, I suppose I have found a new feature to Bash. If user needs to rename a file and the file is in directory /home/user/a/b/c/d/e/file, user needs to write command mv /home/user/a/b/c/d/e/file /home/user/a/b/c/d/e/fileB. This command contains the directory written two times. so if Bash wou

How to convert symbolic links pointing outside to a file?

2010-06-14 Thread Peng Yu
Hi, I only want to convert symbolic links that point outside the directory to be archived to a file. But I still want to keep symbolic links point inside as symbolic links. Is there an option or a walkaround to do so in tar? -- Regards, Peng

Re: new features to GNU Bash

2010-06-14 Thread Andreas Schwab
mika.p.maki...@webinfo.fi writes: > user needs to write command mv /home/user/a/b/c/d/e/file > /home/user/a/b/c/d/e/fileB. $ mv /home/user/a/b/c/d/e/{file,fileB} Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now

Re: How to convert symbolic links pointing outside to a file?

2010-06-14 Thread Eric Blake
On 06/14/2010 08:08 AM, Peng Yu wrote: > Hi, > > I only want to convert symbolic links that point outside the directory > to be archived to a file. But I still want to keep symbolic links > point inside as symbolic links. Is there an option or a walkaround to > do so in tar? Perhaps, but asking o

Re: String replacements leak small amounts of memory each time

2010-06-14 Thread Øyvind Hvidsten
It would seem Debian Squeeze uses that option as default. Without it, I get a whole ton of warnings, and errors about "free", "malloc" and "realloc" being defines multiple times. Have you tried to reproduce the problem outside of Valgrind? Just running the examples and looking at the memory us

Re: String replacements leak small amounts of memory each time

2010-06-14 Thread Chet Ramey
On 6/14/10 5:25 PM, Øyvind Hvidsten wrote: > It would seem Debian Squeeze uses that option as default. > Without it, I get a whole ton of warnings, and errors about "free", > "malloc" and "realloc" being defines multiple times. > > Have you tried to reproduce the problem outside of Valgrind? Just