The rm command | Computing (2024)

The rm command is used to delete files.

  • rm -i will ask before deleting each file. Some people will have rm aliased to do this automatically (type "alias" to check). Consider using rm -I instead, which will only ask once and only if you are trying to delete three or more files.
  • rm -r will recursively delete a directory and all its contents (normally rm will not delete directories, while rmdir will only delete empty directories).
  • rm -f will forcibly delete files without asking; this is mostly useful if you have rm aliased to ``rm -i'' but want to delete lots of files without confirming each one.

Removing troublesome files

Files with spaces or odd characters
Put single quotes round the filename to hide the space from the shell, you could escape the space with \ if you prefer. Or just start typing the name and hit Tab and the shell will do this for you.
For a filename which begins with a dash (-) you also need to precede the name with ./ to prevent it being treated specially.
No such file or directory
If this happens when trying to delete a file with a long name, it was probably displayed in truncated format. Press Tab to ask the shell to auto-complete the filename for you.
Device or resource busy
You can't delete a file which is in use. Reboot the computer and try again. Or try to track down the processes which are using the file.
/usr/sbin/lsof filenameps auxwww | grep process_id# If the processes belong to you and you don't mind killing themkill process_id# Be more emphatickill -9 process_id
The rm command | Computing (2024)
Top Articles
What are the Privacy Concerns with Portable Touch Screen Monitors? A Guide to Addressing Them - Faytech North America - Manufacturer for Touch Screen Monitors and PCs
When To Start Packing: Home Buyers & Sellers
Radikale Landküche am Landgut Schönwalde
Fort Morgan Hometown Takeover Map
Section 4Rs Dodger Stadium
Maria Dolores Franziska Kolowrat Krakowská
Collision Masters Fairbanks
Black Gelato Strain Allbud
Rondale Moore Or Gabe Davis
Red Wing Care Guide | Fat Buddha Store
Noaa Weather Philadelphia
Https Www E Access Att Com Myworklife
Matthew Rotuno Johnson
Louisiana Sportsman Classifieds Guns
Immortal Ink Waxahachie
Puretalkusa.com/Amac
3476405416
Everything you need to know about Costco Travel (and why I love it) - The Points Guy
Foxy Brown 2025
Nevermore: What Doesn't Kill
Yard Goats Score
Hermitcraft Texture Pack
Shopmonsterus Reviews
Xsensual Portland
Chicago Based Pizza Chain Familiarly
Carroway Funeral Home Obituaries Lufkin
Motorcycle Blue Book Value Honda
Umn Biology
Criglist Miami
Ihs Hockey Systems
Courtney Roberson Rob Dyrdek
What Is Opm1 Treas 310 Deposit
Armor Crushing Weapon Crossword Clue
The Legacy 3: The Tree of Might – Walkthrough
Police Academy Butler Tech
Reborn Rich Ep 12 Eng Sub
Acadis Portal Missouri
Srg Senior Living Yardi Elearning Login
Cherry Spa Madison
Kelley Blue Book Recalls
Ferguson Showroom West Chester Pa
Kb Home The Overlook At Medio Creek
Charli D'amelio Bj
Csgold Uva
Lorton Transfer Station
3367164101
Enter The Gungeon Gunther
Shannon Sharpe Pointing Gif
Wild Fork Foods Login
Ssss Steakhouse Menu
Latest Posts
Article information

Author: Chrissy Homenick

Last Updated:

Views: 6029

Rating: 4.3 / 5 (54 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Chrissy Homenick

Birthday: 2001-10-22

Address: 611 Kuhn Oval, Feltonbury, NY 02783-3818

Phone: +96619177651654

Job: Mining Representative

Hobby: amateur radio, Sculling, Knife making, Gardening, Watching movies, Gunsmithing, Video gaming

Introduction: My name is Chrissy Homenick, I am a tender, funny, determined, tender, glorious, fancy, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.