Linux: The Ultimate Step by Step Guide to Quickly and Easily Learning Linux by Dawson Ted
Author:Dawson, Ted [Dawson, Ted]
Language: eng
Format: azw3
Published: 2015-10-12T16:00:00+00:00
Removing Files and Directories with "rm" and "rmdir"
To delete a file, you can use the rm command.
Note: Be extremely careful when using any destructive command like rm. There is no "undo" command for these actions so it is possible to accidentally destroy important files permanently.
To remove a regular file, just pass it to the rm command:
cd
rm file4
Likewise, to remove empty directories, we can use the rmdir command. This will only succeed if there is nothing in the directory in question. For instance, to remove the example directory within the testing directory, we can type:
rmdir testing/example
If you wish to remove a non-empty directory, you will have to use the rm command again. This time, you will have to pass the -r option, which removes all of the directory's contents recursively, plus the directory itself.
For instance, to remove the again directory and everything within it, we can type:
rm -r again
Once again, it is worth reiterating that these are permanent actions. Be entirely sure that the command you typed is the one that you wish to execute.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7770)
Filmora Efficient Editing by Alexander Zacharias(5813)
The Infinite Retina by Robert Scoble Irena Cronin(5293)
Learn Wireshark - Fundamentals of Wireshark. by Lisa Bock(3992)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3936)
Edit Like a Pro with iMovie by Regit(3442)
Linux Administration Best Practices by Scott Alan Miller(2858)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic & Jasmin Redzepagic(2837)
MCSA Windows Server 2016 Study Guide: Exam 70-740 by William Panek(2522)
Mastering PowerShell Scripting - Fourth Edition by Chris Dent(2413)
Docker on Windows by Stoneman Elton(2319)
Kali Linux - An Ethical Hacker's Cookbook: End-to-end penetration testing solutions by Sharma Himanshu(2316)
Creative Projects for Rust Programmers by Carlo Milanesi(2264)
Hands-On AWS Penetration Testing with Kali Linux by Karl Gilbert(2112)
Hands-On Linux for Architects by Denis Salamanca(2053)
Programming in C (4th Edition) (Developer's Library) by Stephen G. Kochan(2006)
Computers For Seniors For Dummies by Nancy C. Muir(2004)
The Old New Thing by Raymond Chen(1941)
Linux Kernel Debugging by Kaiwan N Billimoria(1764)
