unixdelete-file

Delete a folder named ~ in unix


Under my home directory I see a directory named ~. I guess I must have accidentally copied my home directory somehow.

Anyway, it's eaten up all my space and I'd like to remove it but obviously just running rm -r ~ will delete the entire contents of my home directory.

Any idea how to delete that ~ directory without any damage?


Solution

  • Just add a \ before it: rm -rf \~.