Re:The tale of aux.c
by zanchey on Tuesday September 26, 2017 @04:59AM
(#15337200)
There's something in my environment that keeps creating a file called "-" in my home directory, and it's driving me crazy.
[ Parent
| on HN ]
Re:The tale of aux.c
by jovial_cavalier on Tuesday September 26, 2017 @05:36AM
(#15337310)
By convention, when a unix program is passed "--" it means there are no more flags being passed. Try the following:
$ rm -- -
Re:The tale of aux.c
by ConfucianNardin on Tuesday September 26, 2017 @06:33AM
(#15337515)
This will not work with all rm implementations, in which case you can fall back to: rm ./-
Oh, I can remove it... And a few hours or days later it's back!
Re:The tale of aux.c
by jovial_cavalier on Tuesday September 26, 2017 @10:06AM
(#15338739)
Okay, you're gonna want to type $sudo crontab -e...
Re:The tale of aux.c
by codedokode on Tuesday September 26, 2017 @12:20PM
(#15340076)
It is better to write EDITOR=nano sudo crontab ... otherwise instead of edititng the crontab you will be solving the problem of exiting vi.
All the interest encouraged me to dig in and find it, and it turned out to be in one of zsh's many startup scripts.
Open the parent directory with emacs and you can use it to delete the rogue directory/file. Admittedly, there's easier ways for a "-" named file, but its a good solution to know since you can use it to delete even the most difficult filenames.