The rmdir command removes an empty directory. To remove a directory whose name contains a backslash, the backslash must be escaped with another backslash. Therefore, the correct command is rmdir ~/\dir. The other commands will either fail to find the directory or interpret the backslash as part of a path name. References:
[LPI Linux Essentials - 1.3 Basic Editing]
[LPI Linux Essentials - 1.4 I/O Redirection]
[LPI Linux Essentials - 1.5 Manage Simple Partitions and Filesystems]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit