linux中查看隐藏文件夹_如何在Linux中隐藏图像中的文件或文件夹

linux中查看隐藏文件夹

linux中查看隐藏文件夹

00_lead_image_hiding_folder_in_image

If other people use your Linux PC from time to time, you can hide files and folders from prying eyes. But if they know the obvious way to view hidden files, you can use a more secretive method: compress those files and hide them in an innocent looking image file.

如果其他人不时使用您的Linux PC,则可以隐藏文件和文件夹以免被窥探 。 但是,如果他们知道查看隐藏文件的明显方法,则可以使用一种更隐秘的方法:压缩这些文件并将其隐藏在看起来无害的图像文件中。

Before we begin, create a directory containing an image file (.png or .jpg), and the file or directory you want to hide. For our example, we are going to hide a directory of files, called secret_files. Our original image file is htg-site.png. Use the cd command to change to the directory containing the image and the file or folder to be hidden.

在开始之前,创建一个包含图像文件(.png或.jpg)以及您要隐藏的文件或目录的目录。 对于我们的示例,我们将隐藏一个名为secret_files的文件目录。 我们的原始图像文件是htg-site.png。 使用cd命令更改为包含图像以及要隐藏的文件或文件夹的目录。

cd files_to_hide/
01_folder_and_image_file

We will create a compressed file containing the directory we want to hide in the image. To do this, we type the following command at the prompt and press Enter.

我们将创建一个压缩文件,其中包含我们要隐藏在图像中的目录。 为此,我们在提示符下键入以下命令,然后按Enter。

zip -r secret.zip secret_files/

In the above command, -r will include all subdirectories within the specified directory in the compressed file. The name of the compressed file is secret.zip and the name of the directory to be compressed is secret_files.

在上面的命令中, -r将在压缩文件的指定目录中包含所有子目录。 压缩文件的名称为secret.zip ,压缩目录的名称为secret_files

When you are returned to the command prompt, type ls and press Enter. You will see the secret.zip file (or whatever you named your compressed file) listed.

返回命令提示符后,键入ls并按Enter。 您将看到secret.zip文件(或任何您命名为压缩文件的文件)。

02_zipping_secret_folder

Now, we’re going to concatenate the compressed file and image file, and save that as a new image file using the cat command. In our example, we type the following command at the prompt and press Enter.

现在,我们将连接压缩文件和图像文件,并使用cat命令将其另存为新图像文件。 在我们的示例中,我们在提示符下键入以下命令,然后按Enter。

cat htg-site.png secret.zip > secret.png

The original image file must be listed first before the name of the compressed file you want to insert into the image file. Then, we direct (>) the original image file and the compressed file into a new image called secret.png .

原始图像文件必须在要插入图像文件的压缩文件名称之前首先列出。 然后,我们将原始图像文件和压缩文件定向(>)到一个名为secret.png的新图像中。

03_putting_compressed_file_into_image

When you use the ls command at the prompt, you’ll see the new image file, secret.png , that is hiding the compressed file. You can display the new image using any image viewer or editor. An easy way to view the image is to double-click on it in Nautilus. It will automatically open in the default image viewer.

在提示符下使用ls命令时,您将看到新的图像文件secret.png ,该文件隐藏了压缩文件。 您可以使用任何图像查看器或编辑器显示新图像。 一种查看图像的简单方法是在Nautilus中双击它。 它将在默认的图像查看器中自动打开。

Once you have your new image that is hiding your file or folder, you can delete the compressed file and original file or folder, using the rm command. In our example, we typed the following two commands to delete our compressed file and original folder.

拥有隐藏文件或文件夹的新映像后,可以使用rm命令删除压缩文件以及原始文件或文件夹。 在我们的示例中,我们键入以下两个命令来删除压缩文件和原始文件夹。

rm secret.zip
rm -r secret_files
04_removing_compressed_file_and_secret_files

To access the hidden file or folder again, make sure you’re in the directory containing the image in which your file or folder is hidden. Then, extract the file or folder from the image by typing the following command and pressing Enter.

要再次访问隐藏的文件或文件夹,请确保您位于包含隐藏文件或文件夹的图像的目录中。 然后,通过键入以下命令并按Enter键,从图像中提取文件或文件夹。

unzip secret.png

Substitute the name of your image file for secret.png in the above command.

在上述命令中,将图像文件的名称替换为secret.png

05_unzipping_secret_image

Our secret_files directory is available again, and when we change to that directory ( cd secret_files/ ), and list the files ( ls ), we see our original files.

我们的secret_files目录再次可用,当我们转到该目录( cd secret_files/ ),并列出文件( ls )时,我们看到了原始文件。

06_private_files_extracted

This is not necessarily the most secure way to protect your files. It just makes them less obvious to someone poking around your system. You can encrypt your zip files to make them more secure.

这不一定是保护文件的最安全方法。 这只是使它们对于在您的系统中四处乱窜的人不太明显。 您可以加密zip文件以使其更加安全

You can also hide a compressed file in an image in Windows.

您也可以在Windows中将压缩文件隐藏在图像中

翻译自: https://www.howtogeek.com/270668/how-to-hide-a-file-or-folder-in-an-image-in-linux/

linux中查看隐藏文件夹

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值