๐Ÿ“–
Resources
  • ๐Ÿ‘‹Welcome!
  • Semesters
    • ๐Ÿš€S1 & S2
      • ๐Ÿ”Focus
      • โš—๏ธChemistry
      • ๐Ÿ”ญPhysics
      • ๐Ÿ“ŠLAC
      • ๐Ÿ“ˆVCD
      • ๐Ÿ˜๏ธBCE - BME
      • ๐Ÿ”ŒBEE
      • ๐Ÿ“Graphics
      • โš™๏ธMechanics
      • ๐Ÿ–ฅ๏ธCP
      • โ›ท๏ธLife Skills
      • ๐Ÿง‘โ€๐Ÿ’ผPC
    • ๐Ÿ“šS3
      • ๐Ÿ“‰DS
      • โš™๏ธDE
      • ๐Ÿ“ŠDMS
      • ๐Ÿง‘โ€๐Ÿ’ปOOP
      • ๐Ÿ–ฅ๏ธOOP Lab
      • ๐Ÿ—๏ธLSD
      • ๐ŸŒฑSE
      • ๐Ÿ”Extras
    • ๐Ÿ““S4
      • ๐Ÿ“ŠGT
      • ๐Ÿ’พCOA
      • ๐ŸชฃDBMS
      • ๐Ÿ’ฝOS
      • ๐Ÿ˜ƒPE
      • ๐Ÿ‡ฎ๐Ÿ‡ณCOI
      • ๐ŸฅผDE Lab
      • ๐Ÿ’ปOS Lab
      • ๐Ÿ”Number Theory
    • โœ๏ธS5
      • ๐Ÿ’พFLAT
      • ๐Ÿ›œCN
      • ๐Ÿ’ฝSS
      • ๐Ÿ•น๏ธMM
      • ๐Ÿ’ปMOSS
      • โ˜ข๏ธDM
      • ๐ŸฅผSS&M Lab
      • ๐ŸชฃDBMS Lab
      • Cryptographic Algorithms
    • ๐Ÿ“–S6
      • CD
      • CGIP
      • AAD
      • PIP (Elective)
      • IEFT
      • CCW
      • Networking Lab
      • Mini Project
    • ๐Ÿ“S7
    • ๐ŸŽ“S8
  • Resources
    • Git
      • Git installation
      • What is Git?
    • Linux
      • Introduction
        • History of Operating System
        • Rise of GNU Project
        • Basic Terminologies
      • Linux shell
      • Commands
        • The Linux man command
        • The Linux ls command
        • cd command
        • The Linux pwd command
        • The Linux mkdir command
        • The Linux rmdir command
        • mv command
        • cp command
        • open command
        • touch command
        • find command
        • Cat command
        • grep command
        • Echo command
        • Vim Editor
        • Emacs Editor
        • Nano editor
        • whoami command
        • who command
        • su command
        • sudo command
        • passwd command
        • clear command
        • History command
    • DSA
      • 1.2 Concepts of Sliding Window Technique
      • 2.2 Characteristics of Sliding Window Problems
      • 1.3 Introduction to Deque and Monotonic Stack
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Resources
  2. Linux
  3. Commands

The Linux rmdir command

Just as you can create a folder using mkdir, you can delete a folder using rmdir:

mkdir fruits
rmdir fruits

You can also delete multiple folders at once:

mkdir fruits cars
rmdir fruits cars

The folder you delete must be empty.

To delete folders with files in them, we'll use the more generic rm command which deletes files and folders, using the -rf option:

rm -rf fruits cars

Be careful as this command does not ask for confirmation and it will immediately remove anything you ask it to remove.

There is no bin when removing files from the command line, and recovering lost files can be hard.

PreviousThe Linux mkdir commandNextmv command

Last updated 1 year ago

Was this helpful?