To delete files and folders in linux, you can directly use rm to delete them. to delete files or folders completely, you can use the shred command. next I will introduce them to you.
Deleting a directory in linux is very simple. many people are still used to using rmdir. However, once the directory is not empty, it is deeply worried. now we can use the rm-rf comm
Using the rm DELETE command in linux to delete a file only recycles the inode of the file. This does not mean that the block is completely cleared, for details, refer to my previous blog post "Understanding the linux File System in depth ".
To delete the rm command, we can use tools like ext3grep and photorec before the partition of the deleted file is overwritten into new data. What if we want to complete
Linux File Protection and thorough deletion-general Linux technology-Linux technology and application information. For more information, see. I often see articles about how to use chmod to modify file permissions on the Internet. But there are few articles about the other two classic file operation commands in linux: c
arbitrary destroyed data, even when hackers or thieves use high-level data recovery tools or devices. Shred is installed in all Linux distributions by default. If you want to, run the following command to find its installation directory:
aun@eagle:~$ whereis shred
shred:/usr/bin/
, you can use the Shred command to implement,shred is a part of the coreutils , so Linux basically will have this command. Shred How to delete files completely :The code is as follows $ shred-u File Shred will overwrite the nod
, you can use the Shred command to implement,shred is a part of the coreutils , so Linux basically will have this command. Shred How to delete files completely :The code is as follows $ shred-u File Shred will overwrite the nod
completelysometimes we have to completely delete some files, you can use the shred command to implement, Shred is a part of the coreutils, so Linux basically will have this command.Shred how to delete files completely:The code is as follows$ shred-u FileShred will overwrite the node and data block where the file resid
completely delete some files, which can be implemented using the shred command. shred is part of coreutils, so this command is basically used in Linux.
Shred:
The code is as follows:
$ Shred-u file
Shred will overwrite the node a
clear the file content and delete the file at the same time, run the following command:
Shred-u mytaxes. odt
It should be emphasized that shred does not run normally in all file systems, especially those newer file systems with log functions. In the shred operation manual, you can find out which file systems run the program. When processing sensitive data, the b
wording, a pair of curly braces + space +/+;
Delete Files completely
Sometimes we have to completely delete some files, you can use the Shred command to achieve, shred is a part of the coreutils, so the basic Linux will have this command.
Shred the method of deleting a file completely:
The code is as follows
$
+ space +/+;
Delete Files completely
Sometimes we have to completely delete some files, you can use the Shred command to achieve, shred is a part of the coreutils, so the basic Linux will have this command.
Shred the method of deleting a file completely:
The code is as follows
Copy Code
Delete files and folders in Linux we can use RM directly to delete, delete files or folders completely we can use the Shred command to complete, below I give you introduction.
Linux Delete Folder command
Linux Delete directory is very simple, many people are still accustomed to using rmdir, but once the directory is
;-Delete Folder instance:
Rm-rf/var/log/httpd/access
The/var/log/httpd/access directory and all the files and folders under it will be deletedNeed to be reminded: Use this RM-RF must be extra careful, Linux has no Recycle Bin
2 Deleting files
De>rm-f filenamede>You must be careful when using RM-RF, Linux does not have a recycle Bin
Delete files other than the specified fileFirst,
Linux Command learning Summary: rm command, linux Command summary rm
Command introduction:
This command is used to delete files or directories in Linux. Normally, rm will not delete the directory. You must specify the-r or-R parameter to delete the directory. In addition, rm can usually restore the file or directory. (Note: When rm deletes a file, it only rel
/var/log/httpd/accessThe/var/log/httpd/access directory and all files and folders under it will be deletedTo be reminded: Use this RM-RF with extreme caution, Linux does not have a recycle Bin2 Deleting filesDe>rm-f filenamede>Use RM-RF with extreme caution, Linux does not have a recycle BinDelete files other than the specified fileFirst, delete files and folders under
signal to the process.Get the specified process ID first, and then end the process as follows:
$pidofvlc
$sudokill-KILL10279
Find and end processes in LinuxView the KILL command for more usage options and information.5. Permanently delete files in LinuxIn general, we rm remove files from the Linux system by using commands. However, these files are not really deleted, they are still stored there and hidden on your hard drive, and oth
this, we can use the Shred command which overwrites the file content and optionally deletes the file as well.$ Shred-zvu Tecmint.pdfThe options used in the above command:
-z–adds a final overwrite with zeros to hide shredding.
-u–helps to truncate and remove file after overwriting.
-v–shows progress.
Delete File permanently in LinuxRead through Sh
attributes of the file, such as the owner or whether there is a sticky bit. Pay attention to these issues.
Linux logs are scattered all over the system, and the system administrator can flexibly specify the location where logs are stored, which requires us to be very careful, it is unwise to use a common log removal or rewriting tool. Therefore, we need to have a comprehensive understanding of the log system to be modified. For more information, see
"Command Example"Edit File/100nano/10012.vi/vim"Command function" opens a file with VI or VIM editor (VIM is the most commonly used text editor in a Linux system)"Command Syntax" Vi/vim [options] (parameters)"Common Options""Built-in common commands"ESC: Switching from edit mode to command mode: line number: The cursor jumps to the line number of the specified lineDD: Deletes the cursor as it moves forwardNDD: Deletes the current line and its subseque
One of the coolest things about using Linux is that as time goes on, you can keep getting new knowledge. Every day, you may encounter a new utility, or just a less familiar artifice, but very useful. These fragmentary things are not always able to change life, but they are the basis of professional knowledge.Even an expert can never know everything. No matter how much experience you have, there may always be more things for you to learn. So, here I've
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.