linux中查看隐藏文件夹_如何在Linux中隐藏图像中的文件或文件夹
linux中查看隱藏文件夾
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/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文件(或任何您命名為壓縮文件的文件)。
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.pngThe 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的新圖像中。
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_filesTo 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.pngSubstitute the name of your image file for secret.png in the above command.
在上述命令中,將圖像文件的名稱替換為secret.png 。
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 )時,我們看到了原始文件。
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中查看隱藏文件夾
總結
以上是生活随笔為你收集整理的linux中查看隐藏文件夹_如何在Linux中隐藏图像中的文件或文件夹的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数字图像处理(第二章)
- 下一篇: 关于linux用Xshell的xftp查