How to delete files in linux system?

藏色散人
Release: 2020-09-19 10:16:10
Original
47086 people have browsed it

To delete files under Linux system, you can use the rm command. The rm command can delete one or more files or directories in a directory, or delete a directory and all its subordinate files and subdirectories.

How to delete files in linux system?

How to delete files in Linux system:

1. First enter the Linux system terminal (here is the centos system), as shown below :

How to delete files in linux system?

2. Let’s create a new file and use the touch command to create it, as shown below:

How to delete files in linux system?

3. To view the file, use the command find to view it, as shown below:

How to delete files in linux system?

#4. After viewing the file, use the command to delete the file, that is, use the rm command, as shown below:

How to delete files in linux system?

5. Use the find command again to check, as shown below:

How to delete files in linux system?

The system prompts No such file or directory, indicating that the file cannot be found. The file was deleted successfully.

The above is the detailed content of How to delete files in linux system?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template