rmdir (remove empty directory)

The rmdir command, short for “remove directory,” enables you to delete empty directories. This is useful for cleaning up unused folders and maintaining a streamlined file system.

The syntax for rmdir is:

rmdir [directory_name]

Note: rmdir can only delete empty directories.

Observation

Observe that the empty directory was removed.

File System Navigation Commands in Linux

Linux offers an alternative to the usual windows and icons. The terminal might seem different at first, relying on text commands instead of a mouse. It might seem different at first, relying on text commands instead of a mouse. But this simplicity holds immense power.

In this article, you’ll be going through a demonstration of Navigation Commands in Linux which will help in quickly navigating in the Linux file system. Let’s go through them, but before that have a short idea of the difference between Linux and Windows file systems.

File System Navigation Commands in Linux

  • Difference between Windows and Linux File System
  • Commonly Used File System Navigation Commands
  • 1. pwd (print working directory)
  • 2. ls (list files and directories)
  • 3. cd (change directory)
  • 4. mkdir (make directory)
  • 5. rmdir (remove empty directory)
  • 6. cp (copy)
  • 7. mv (move)
  • Additional Shortcut Tips

Similar Reads

Difference between Windows and Linux File System

...

Commonly Used File System Navigation Commands

Linux Commands Functions pwd Shows the current location. ls List files and folders. cd Change working directory. mkdir Used to create new folder. rmdir Remove an empty folder. cp Creating a copy of a file in a new location. mv Relocate files from one folder to another....

1. pwd (print working directory)

The pwd command shows the current location in the system. It tells you which folder you’re currently in....

2. ls (list files and directories)

The ls command is used to list the files and directories in the current directory. It provides an overview of what is inside a folder....

3. cd (change directory)

The cd command is used to move between folders. You can tell it exactly which folder you want to go to (like giving it an address), or you can use shortcuts to get around. Let’s look into both the methods....

4. mkdir (make directory)

The mkdir command, an abbreviation for “make directory,” allows you to create new folders within your existing file system. This provides a structured way to categorize and store your files....

5. rmdir (remove empty directory)

The rmdir command, short for “remove directory,” enables you to delete empty directories. This is useful for cleaning up unused folders and maintaining a streamlined file system....

6. cp (copy)

The cp command acts like a duplicator, creating a copy of a file in a new location....

7. mv (move)

The mv command is like a handy mover, allowing you to relocate files from one folder to another....

Additional Shortcut Tips

Serial No Symbol Symbol Name Function 1 ~ tilde shortcut to your home base 2 . dot the folder you’re in right now 3 .. double dot the folder one level above...

Conclusion

The Linux terminal might seem daunting at first, but with a handful of basic commands, you’ve unlocked the ability to navigate the file system with ease. By using pwd to check your location, cd to move around, and ~, ., and .. for shortcuts, you can efficiently access files and folders. Remember, the tree command provides a helpful visual map of the directory structure....

File System Navigation in Linux – FAQs

What if I forget the exact command name?...

Contact Us