OT: Re: how to make a directory link to /dev/null???

Cliff cliffo at u.washington.edu
Fri Jul 28 00:18:48 PDT 2000


A bit off topic, but worth mentioning...symlinking cookies to /dev/null works like a champ and cookies stay in memory until you exit your browser...very nice.

Mike wrote:

> That's a pretty good idea.  But if you'd still like to use your browser
> cache you could use scripts to delete your cache (and other miscellaneous
> files).  I have a generic script called "junkit" which takes a file or
> directory as argument and, if it exists, it gets deleted.  Works great for
> those pesky cookies and browser histories too!  Run that from cron once
> (or more) a day and you're all set (assuming you've exited your browser):
>
> #########################
> #!/bin/sh
> # If the specified file/directory exists, delete it.
>
> arg=$1
> if [ -d $arg ]; then
>         rm -rf $arg
> elif [ -w $arg ]; then
>         rm -f $arg
> else
>         exit
> fi
> #########################
>
> ---------------------------
> -=<(| mike at boobaz.net |)>=-
>
> On Thu, 27 Jul 2000, Steve Juranich wrote:
>
> |You don't want to use the mkdir command before.  Just type
> |
> |ln -s /dev/null junk
> |
> |And that /should/ do the trick. I know that I used to have my
> |~/.netscape/cache directory linked to /dev/null in the same way and that's
> |how I did it.  Worked like a charm.
> |
> |--------------------------------------------------------------------------
> |Stephen W. Juranich                                                            sjuranic at ee.washington.edu
> |Electrical Engineering                    http://students.washington.edu/sjuranic
> |University of Washington                               http://truk.ee.washington.edu/ssli
> |
> |
> |On Thu, 27 Jul 2000, F. Pascual wrote:
> |
> |> I would like to make a directory (call it 'junk') symbolically linked to /dev/null, such that when I transfer files to the directory 'junk', they get written to /dev/null.
> |>
> |> however, when I do this:
> |>
> |> mkdir junk
> |> ln -s /dev/null junk
> |>
> |> ...there is a symbolically linked _file_ contained within 'junk' to /dev/null; the entire directory itself is not linked to /dev/null.  I can still copy files to 'junk' and have then show up when I ls from within 'junk'; they don't get written to dev nu
> |ll.
> |>
> |> Anyone know how to create the link to /dev/null so that when anything gets written to the directory 'junk', it goes to /dev/null?
> |>
> |>
> |>
> |> Get your FREE Email and Voicemail at Lycos Communications - http://comm.lycos.com
> |>
> |



More information about the Linux mailing list