Removing Erroneous Directory Entries

john.urban urban at cbnewsl.att.com
Thu May 9 23:28:52 AEST 1991


In article <1991May9.051239.15919 at gpu.utcs.utoronto.ca> aponty at gpu.utcs.utoronto.ca (Adele Ponty) writes:
>One of the users on our system somehow managed to create an
>entry in our user_data directory which now appears at the
>top of the directory listing as,  -k@   .  A long listing 
>reveals it to be some sort of link entry they tried to create;
>l--------- -k@   ...    ...  -k@ -> df
>Can someone tell me how to get rid of it?  Can I prevent this
>from happening again?  Thanks in advance.
>

See the FAQ (Frequently Asked Questions) #1 and 2.

This was probably create via:
	# ln -s df '-k\@'		<- Note \ is to escape the @ symbol.
	# ls -l
	lrwxrwxrwx  1 root other   2 May 8 09:22 -k@ -> df
	drwxrwxrwx  2 sys  sys   512 May 8 09:22 .
	drwxrwxr-x 24 root sys   512 May 7 15:38 ..

To remove it type in:
	# rm - -k\@

The first - notifies rm that all the arguements are done so therefore the -k isn't
an argument to rm but a file name.

You could have also typed in:
	# rm ./-k\@


Sincerely,

John Ben Urban
att!attunix!jbu



More information about the Comp.unix.questions mailing list