Tuesday, January 7, 2025
HomeTechHow to Delete Files in Linux?

How to Delete Files in Linux?

To delete files in Linux, use the rm command:

  • Basic Command: rm filename (Deletes a specific file).
  • Delete Multiple Files: rm file1 file2 file3.
  • Force Delete: rm -f filename (Skips confirmation).
  • Interactive Mode: rm -i filename (Asks before deleting).
  • Recursive Deletion: rm -r directory (Deletes directory and contents).
See also  What is a Database?

Be cautious when using rm, especially with -f or -r, as deletions are permanent.

RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x