Re: mtab very long
From: Maurits van Rees (maurits_at_vanrees.org)
Date: 05/25/05
- Previous message: Ionut Georgescu: "Re: X and sound on debian"
- In reply to: michael: "Re: mtab very long"
- Next in thread: michael: "Re: mtab very long"
- Reply: michael: "Re: mtab very long"
- Reply: Paul Smith: "Use of ":" (was: Re: mtab very long)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 May 2005 12:40:30 +0200 To: debian-user@lists.debian.org
On Wed, May 25, 2005 at 11:28:04AM +0100, michael wrote:
> On Wed, 2005-05-25 at 12:00 +0200, Urs Thuermann wrote:
> > : > /etc/mtab
>
> what's the ':' do???
Nothing. At least hardly anything worth mentioning. See this snippet
from the bash manual:
#####
SHELL BUILTIN COMMANDS
: [arguments]
No effect; the command does nothing beyond expanding arguments and
performing any specified redirections. A zero exit code is returned.
#####
That also means it doesn't have any output. This empty output
is now redirected to /etc/mtab, making that file empty. You can try
other methods as well, e.g. 'cat /dev/null > /etc/mtab'.
maurits@mauritsvanrees:~$ echo "Hello World" > temp
maurits@mauritsvanrees:~$ cat temp
Hello World
maurits@mauritsvanrees:~$ : > temp
maurits@mauritsvanrees:~$ cat temp
maurits@mauritsvanrees:~$
Does anyone know any other uses for this ':' command?
HTH,
-- Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] Public GnuPG key: keyserver.net ID 0x1735C5C2 "Let your advance worrying become advance thinking and planning." - Winston Churchill
-- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
- application/pgp-signature attachment: Digital signature
- Previous message: Ionut Georgescu: "Re: X and sound on debian"
- In reply to: michael: "Re: mtab very long"
- Next in thread: michael: "Re: mtab very long"
- Reply: michael: "Re: mtab very long"
- Reply: Paul Smith: "Use of ":" (was: Re: mtab very long)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|