Showing posts with label linux. solaris. Show all posts
Showing posts with label linux. solaris. Show all posts

Wednesday, July 17, 2013

Mount ISO image in Linux

Getting a lot of emails regarding mounting ISOs in linux. Please use the following steps in order to mount the image to FS.

Procedure to mount ISO images in Linux.

1) Login as a root user:
$ su -

2) Create a mount point:
# mkdir -p /mnt/disk

3) Mount iso file called mountthisdisk.iso:
# mount -o loop mountthisdisk.iso /mnt/disk

4) Verify it:
# cd /mnt/disk
# ls -l

In case you have not noticed "loop" in the mount command, let me tell you that A loop device is a pseudo-device that makes a file accessible as a block device. Loop devices are often used for CD ISO images and floppy disc images. Mounting a file containing a filesystem via such a loop mount makes the files within that filesystem accessible. They appear in the mount point directory using above commands.

Monday, December 10, 2012

xargs with cp and xargs with mv command


Find with xargs and mv and cp, On public demand :)
=======================================
find . -type f  | xargs -I {} mv {} /target_directory_path/
find . -type f  | xargs -I {} cp -p {} /target_directory_path/

Monday, February 13, 2012

Use awk in following cases


Joining two files parallely using awk:
========================
awk 'NR==FNR{a[NR]=$0; next} {print a[FNR], $0}' file1.txt file2.txt

Changing extension of all .txt to .sh:
========================
for i in *.txt;do mv "$i" "${i%.txt}".sh;done

 

Blogger news

Blogroll