Monday, November 19, 2007

Simple But intriguing

1) How does one create a file starting with hyphen(-)?
2) How does one remove a file starting with hyphen(-)?

My Solution
bash-2.05$touch a
bash-2.05$tar cvf -c.tar a
2)bash-2.05$ rm ./-c.tar


Girish said...

standard interview question.

scripting errors can generate such files. we have an unwritten rule. always use absolute path names. :)

TV de LCD said...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the TV de LCD, I hope you enjoy. The address is A hug.