This is the directory containing the file 'test1.txt' which we want to delete.
We will use the Linux command rm (remove) to erase the file. Enter the following.
rm test1.txt
Replace 'test1.txt' with the name of the file you want to delete.
To erase multiple files place them in a line with a space between each filename. e.g. rm test1.txt test2.txt
You can also use the * wildcard. The command rm *.txt will delete all files in the current directory that end with .txt
Use rm -i filename(s) to individually confirm each file to delete.
Other options include: -
-v Verbose mode
-f Force a deletion even if a file is write protected.
This Website uses cookies to improve Your experience. Feel free to accept or decline Our use of cookies. If You decline We will still use cookies essential to the workings of this Website but there may be somethings that no longer function correctly for You as the User of the Website. If You object to Us using absolutely essential cookies then Our advice would be to leave this Website now to avoid this continuing to happen. If you continue to use this Website for more than about 30 seconds We will take it to mean You have accepted Our use of cookies and the consent box will disappear automatically. Click to read Our full Privacy Policy.
Name | Domain | Purpose | Expiry | Type |
---|---|---|---|---|
wpl_user_preference | hostingorservers.com | WP GDPR Cookie Consent Preferences | 3 months | HTTP |
Name | Domain | Purpose | Expiry | Type |
---|---|---|---|---|
CLID | www.clarity.ms | --- | 1 year | --- |
_clck | hostingorservers.com | --- | 1 year | --- |
_clsk | hostingorservers.com | --- | 1 days | --- |