{"id":13399,"date":"2019-04-01T23:51:24","date_gmt":"2019-04-01T23:51:24","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13399"},"modified":"2019-04-01T23:51:24","modified_gmt":"2019-04-01T23:51:24","slug":"3-ways-to-extract-and-copy-files-from-iso-image-in-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/01\/3-ways-to-extract-and-copy-files-from-iso-image-in-linux\/","title":{"rendered":"3 Ways to Extract and Copy Files from ISO Image in Linux"},"content":{"rendered":"<p>Let\u2019s say you have a large ISO file on your Linux server and you wanted to access, extract or copy one single file from it. How do you do it? Well in Linux there are couple ways do it.<\/p>\n<p><strong>Read Also<\/strong>:\u00a0<a href=\"https:\/\/www.tecmint.com\/create-bootable-usb-in-linux-commandline\/\" target=\"_blank\" rel=\"noopener\">A Bash Script to Create a Bootable USB from ISO in Linux<\/a><\/p>\n<p>For example, you can use standard\u00a0<strong>mount<\/strong>\u00a0command to mount an ISO image in read-only mode using the loop device and then copy the files to another directory.<\/p>\n<h3>Mount or Extract ISO File in Linux<\/h3>\n<p>To do so, you must have an ISO file (I used\u00a0<strong>ubuntu-16.10-server-amd64.iso ISO<\/strong>\u00a0image) and mount point directory to mount or extract ISO files.<\/p>\n<p>First create an mount point directory, where you will going to mount the image as shown:<\/p>\n<pre>$ sudo mkdir \/mnt\/iso\r\n<\/pre>\n<p>Once directory has been created, you can easily mount\u00a0<strong>ubuntu-16.10-server-amd64.iso<\/strong>\u00a0file and verify its content by running following command.<\/p>\n<pre>$ sudo mount -o loop ubuntu-16.10-server-amd64.iso \/mnt\/iso\r\n$ ls \/mnt\/iso\/\r\n<\/pre>\n<div id=\"attachment_23198\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Mount-ISO-File-in-Linux.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23198\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Mount-ISO-File-in-Linux.png\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Mount-ISO-File-in-Linux.png 784w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Mount-ISO-File-in-Linux-768x168.png 768w\" alt=\"Mount ISO File in Linux\" width=\"784\" height=\"172\" aria-describedby=\"caption-attachment-23198\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-23198\" class=\"wp-caption-text\">Mount ISO File in Linux<\/p>\n<\/div>\n<p>Now you can go inside the mounted directory (<strong>\/mnt\/iso<\/strong>) and access the files or copy the files to\u00a0<code>\/tmp<\/code>\u00a0directory using\u00a0<a href=\"https:\/\/www.tecmint.com\/advanced-copy-command-shows-progress-bar-while-copying-files\/\" target=\"_blank\" rel=\"noopener\">cp command<\/a>.<\/p>\n<pre>$ cd \/mnt\/iso\r\n$ sudo cp md5sum.txt \/tmp\/\r\n$ sudo cp -r ubuntu \/tmp\/\r\n<\/pre>\n<div id=\"attachment_23199\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Copy-Files-From-ISO-File-in-Linux.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23199\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Copy-Files-From-ISO-File-in-Linux.png\" alt=\"Copy Files From ISO File in Linux\" width=\"671\" height=\"160\" aria-describedby=\"caption-attachment-23199\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-23199\" class=\"wp-caption-text\">Copy Files From ISO File in Linux<\/p>\n<\/div>\n<p><strong>Note<\/strong>: The\u00a0<code>-r<\/code>\u00a0option used to copy directories recursively, if you want you can also\u00a0<a href=\"https:\/\/www.tecmint.com\/monitor-copy-backup-tar-progress-in-linux-using-pv-command\/\" target=\"_blank\" rel=\"noopener\">monitor progress of copy command<\/a>.<\/p>\n<h3>Extract ISO Content Using 7zip Command<\/h3>\n<p>If you don\u2019t want to mount ISO file, you can simply install\u00a0<strong>7zip<\/strong>, is an open source archive program used to pack or unpack different number of formats including TAR, XZ, GZIP, ZIP, BZIP2, etc..<\/p>\n<pre>$ sudo apt-get install p7zip-full p7zip-rar [On <strong>Debian\/Ubuntu<\/strong> systems]\r\n$ sudo yum install p7zip p7zip-plugins      [On <strong>CentOS\/RHEL<\/strong> systems]\r\n<\/pre>\n<p>Once\u00a0<strong>7zip<\/strong>\u00a0program has been installed, you can use\u00a0<strong>7z<\/strong>\u00a0command to extract ISO file contents.<\/p>\n<pre>$ 7z x ubuntu-16.10-server-amd64.iso\r\n<\/pre>\n<div id=\"attachment_23201\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Extract-ISO-Content-in-Linux.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23201\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Extract-ISO-Content-in-Linux.png\" sizes=\"auto, (max-width: 804px) 100vw, 804px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Extract-ISO-Content-in-Linux.png 804w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Extract-ISO-Content-in-Linux-768x399.png 768w\" alt=\"7zip - Extract ISO File Content in Linux\" width=\"804\" height=\"418\" aria-describedby=\"caption-attachment-23201\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-23201\" class=\"wp-caption-text\">7zip \u2013 Extract ISO File Content in Linux<\/p>\n<\/div>\n<p><strong>Note<\/strong>: As compared to Linux\u00a0<strong>mount<\/strong>\u00a0command,\u00a0<strong>7zip<\/strong>\u00a0seems much faster and smart enough to pack or unpack any archive formats.<\/p>\n<h3>Extract ISO Content Using isoinfo Command<\/h3>\n<p>The\u00a0<strong>isoinfo<\/strong>\u00a0command is used for directory listings of iso9660 images, but you can also use this program to extract files.<\/p>\n<p>As I said\u00a0<strong>isoinfo<\/strong>\u00a0program perform directory listing, so first list the content of ISO file.<\/p>\n<pre>$ isoinfo -i ubuntu-16.10-server-amd64.iso -l\r\n<\/pre>\n<div id=\"attachment_23202\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/List-ISO-Content-in-Linux.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23202\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/List-ISO-Content-in-Linux.png\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/List-ISO-Content-in-Linux.png 794w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/List-ISO-Content-in-Linux-768x404.png 768w\" alt=\"List ISO Content in Linux\" width=\"794\" height=\"418\" aria-describedby=\"caption-attachment-23202\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-23202\" class=\"wp-caption-text\">List ISO Content in Linux<\/p>\n<\/div>\n<p>Now you can extract a single file from an ISO image like so:<\/p>\n<pre>$ isoinfo -i ubuntu-16.10-server-amd64.iso -x MD5SUM.TXT &gt; MD5SUM.TXT\r\n<\/pre>\n<p><strong>Note<\/strong>: The redirection is needed as\u00a0<code>-x<\/code>\u00a0option extracts to stdout.<\/p>\n<div id=\"attachment_23203\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Extract-Single-File-from-ISO-in-Linux.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23203\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Extract-Single-File-from-ISO-in-Linux.png\" sizes=\"auto, (max-width: 1064px) 100vw, 1064px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Extract-Single-File-from-ISO-in-Linux.png 1064w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/10\/Extract-Single-File-from-ISO-in-Linux-768x175.png 768w\" alt=\"Extract Single File from ISO in Linux\" width=\"1064\" height=\"242\" aria-describedby=\"caption-attachment-23203\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-23203\" class=\"wp-caption-text\">Extract Single File from ISO in Linux<\/p>\n<\/div>\n<p>Well, there are many ways to do, if you know any useful command or program to extract or copy files from ISO file do share us via comment section.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/extract-files-from-iso-files-linux\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let\u2019s say you have a large ISO file on your Linux server and you wanted to access, extract or copy one single file from it. How do you do it? Well in Linux there are couple ways do it. Read Also:\u00a0A Bash Script to Create a Bootable USB from ISO in Linux For example, you &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/01\/3-ways-to-extract-and-copy-files-from-iso-image-in-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;3 Ways to Extract and Copy Files from ISO Image in Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13399","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13399"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13399\/revisions"}],"predecessor-version":[{"id":13400,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13399\/revisions\/13400"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}