On Wed, 2005-05-25 at 12:40 +0200, Maurits van Rees wrote: > 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'. > > [EMAIL PROTECTED]:~$ echo "Hello World" > temp > [EMAIL PROTECTED]:~$ cat temp > Hello World > [EMAIL PROTECTED]:~$ : > temp > [EMAIL PROTECTED]:~$ cat temp > [EMAIL PROTECTED]:~$ > > Does anyone know any other uses for this ':' command? >
yes that's what I thought. wasn't quite sure why one would want to wipe out /etc/mtab but IIRC correctly the suggestion was then to remount everything so I guess the suggestion was just a way to reconstruct mtab but why that should help, or rather why the OP's mtab was in a 'mess' I didn't pick up.... cheers, Michael -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]