How to mount an ISO file in Linux
Answer:
1. Create the mount point
# mkdir -p /mnt/iso
2. Mount the iso file using the mount command
# mount -o loop dvd.iso /mnt/iso
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
How to mount an ISO file in Linux
Answer:
1. Create the mount point
# mkdir -p /mnt/iso
2. Mount the iso file using the mount command
# mount -o loop dvd.iso /mnt/iso
How to determine the type of a file in Linux
Answer:
The file command is what you need, e.g.
# file /bin/gzip
/bin/gzip: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.15
# file /usr/share/doc/apt/changelog.gz
/usr/share/doc/apt/changelog.gz: gzip compressed data, from Unix,
max compression
Remove comments (#) and empty lines in a file
Answer:
To quickly remove comments (#) and empty lines in a file, with the help of egrep
# egrep -v '^[ \t]*#|^$' text.txt
How to save the output from top command
Answer:
Use the following tricks to save the output of top command into a file.
# top -n1 > output.txt
How to measure the time needed to execute a command
Answer:
Use the time command, e.g.
# time perl -e 'sleep 5'
real 0m5.026s
user 0m0.010s
sys 0m0.020s
The above perl command takes around 5 seconds to execute.