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 extract and copy Files from ISO Image in Linux

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

Share

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

This article is about how to extract and copy files from ISO images in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Extract ISO Image File under Linux system

To complete this test, you need to have an ISO image file (I use the ubuntu-16.10-server-amd64.iso system image file) and the directory used to mount and extract the ISO image file.

First, create a mount directory to mount the ISO image file using the following command:

$sudo mkdir / mnt/iso

Once the directory is created, you can easily mount the ubuntu-16.10-server-amd64.iso system image file and view its contents by running the following command.

$sudo mount-o loop ubuntu-16.10-server-amd64.iso / mnt/iso$ ls / mnt/iso/ mounts the ISO image in the Linux system

Now you can go to the mount directory / mnt/iso, view the files or use the cp command to copy the files to the / tmp directory.

$cd / mnt/iso$ sudo cp md5sum.txt / tmp/$ sudo cp-r ubuntu / tmp/ copies the files in the ISO image in the Linux system

Note: the "- r" option is used to recursively copy the contents of the directory. If necessary, you can also monitor the progress of the copy command.

Use the 7zip command to extract the contents of the ISO image

If you don't want to mount the ISO image, you can simply install a 7zip tool, a free and open source unzip software that compresses or decompresses files in different formats, including TAR, XZ, GZIP, ZIP, BZIP2, and so on.

$sudo apt-get install p7zip-full p7zip-rar [On Debian/Ubuntu systems] $sudo yum install p7zip p7zip-plugins [On CentOS/RHEL systems]

After the 7zip software is installed, you can use the 7z command to extract the contents of the ISO image.

$7z x ubuntu-16.10-server-amd64.iso

Use 7zip tool to extract files in ISO image under Linux system

Note: compared to Linux's mount command, 7zip is faster and smarter when compressing and decompressing files in any format.

Use the isoinfo command to extract the contents of the ISO image file

Although the isoinfo command is used to list the contents of the iso9660 image in the form of a directory, you can also use this program to extract the file. As I said, the isoinfo program displays a list of directories, so list the contents of the ISO image file first.

List the contents of the ISO file in $isoinfo-I ubuntu-16.10-server-amd64.iso-lLinux

Now you can extract the single file from the ISO image file as follows:

$isoinfo-I ubuntu-16.10-server-amd64.iso-x MD5SUM.TXT > MD5SUM.TXT

Note: because "- x" is unzipped to standard output, the specified file must be extracted using redirection.

Thank you for reading! This is the end of this article on "how to extract and copy files from ISO images in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

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

Development

Wechat

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

12
Report