Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to clear the private data in the file under Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to clear private data in files under Linux". In daily operation, I believe many people have doubts about how to clear private data in files under Linux. Xiaobian consulted all kinds of information and sorted out simple and easy operation methods. I hope to help you answer the doubts about "how to clear private data in files under Linux"! Next, please follow the small series to learn together!

Installing MAT on Linux

On Debian-based systems (Ubuntu or Linux Mint) MAT is already packaged, so installation is straightforward:

$ sudo apt-get install mat

On Fedora, there is no pre-generated MAT package, so you need to generate it from source. Here are the steps I took to generate MAT on Fedora (see the bottom of the tutorial if it doesn't work):

$ sudo yum install python-devel intltool python-pdfrw perl-Image-ExifTool python-mutagen$ sudo pip install hachoir-core hachoir-parser$ wget https://mat.boum.org/files/mat-0.5.tar.xz$ tar xf mat-0.5.tar.xz$ cd mat-0.5$ python setup.py install

Using MAT-GUI Anonymous Metadata

Once installed, MAT is available both through the GUI and from the command line. Enter this command to launch MAT's GUI:

$ mat-gui

Try cleaning up an instance document file (such as private.odt) that contains the following built-in metadata.

Click the Add button to add files to MAT that need cleaning. Once the file is loaded, click the "OK" button to scan all hidden metadata information.

As soon as metadata is detected by MAT, the "State" state is marked as "Dirty." Double-click the file to view the detected metadata.

Click the "Clean" button to clean metadata from the file. MAT automatically empties all private metadata fields in the file.

The cleared state does not contain any privately identifiable traces:

Anonymous metadata from the command line

$ mat -c 。

As mentioned earlier, another way to invoke MAT is from the command line, which can be reached using the mat command.

To check for any sensitive metadata, go to the directory where the file is located and run:

$ mat -c 。

This scans all files in the current directory and its subdirectories and reports their status (cleaned or not cleaned).

You can use the "-d" option to view the detected real metadata:

$ mat -d 《input_file》

If you do not provide any options for the mat command, the default action removes metadata from the file. If you want to keep a copy of the original file during cleanup, use the "-b" option. The following command clears all file metadata and stores the original file as a "*.bak" file.

$ mat -b 。

To view supported file types, run:

$ mat -l

troubleshooting

I am currently experiencing the following issues with the compiled version of MAT on Fedora. When I tried to clean the metadata (e.g..gz,.odt, *.docx) of archive/document files in Fedora, MAT failed with the following error:

File "/usr/lib64/python2.7/zipfile.py", line 305, in __init__ raise ValueError(‘ZIP does not support timestamps before 1980’)ValueError: ZIP does not support timestamps before 1980

summary

MAT is a simple but very useful tool for preventing the inadvertent disclosure of private data from metadata. Please note that file content also needs to be protected if necessary. What MAT does is eliminate metadata associated with the file, but it does nothing to the file itself. In short, MAT is a lifesaver because it can handle most common metadata removals, but you shouldn't expect it to guarantee your privacy alone.

At this point, the study of "how to clear private data in files under Linux" is over, hoping to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report