How to delete a file in the Linux terminal?
Tagged: linux
Viewing 2 posts - 1 through 2 (of 2 total)
- AuthorPosts
- August 28, 2020 at 9:02 AM #3681
Santhosh Kumar D
Keymaster@santhoshLearning how to delete a file in the Linux terminal makes it easy to manage files. To delete a file, you need to use the
rm
command followed by the file name that you want to delete.To delete a single file, use the
rm
command followed by the file name.rm filename
And to delete multiple files, use the
rm
command followed by file names separated by a space.rm filename1 filename2 filename3
Note: Please be careful when deleting files or directories, because once deleted, it is not easy to recover them.
Learn more Linux commands.
August 28, 2020 at 1:06 PM #3697Santhosh Kumar D
Keymaster@santhoshIf a file is write-protected, you will be prompted to confirm the deletion. To force delete a file without being prompted, you need to use the
rm -f
command followed by the file name.rm -f filename
- AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
Advertisement
RECENT TIPS
- How to send email as an alias in Gmail?
- How to stop Google from tracking your location?
- Command to check the Ubuntu version
- How to add a percentage in Excel?
- How to convert currencies in Google Sheets?
- How to voice type on Google Docs?
- What is Django framework?
- How to turn Google Assistant off?
- How to check the Python version?
- How to create a virtual environment in Python?
- How to change the directory in the Command Prompt?
- How to add a shortcode in WordPress PHP template file?
- Useful websites to research stocks
- How to check Linux uptime?
- How to check Linux last reboot time?