Posts Tagged ‘Unix’

How to mount an ISO image on Linux

Posted: November 29, 2015 in HowTo
Tags: , , , ,

Use the following steps to mount an ISO image on Linux. The commands need to be run as ‘root’

Step 1: Create a directory where ISO would be mounted

# mkdir mount-directory

 
Step 2: Mount ISO image to recently created directory

 # mount -t iso9660 -o loop iso-filename.iso mount-directory

 
Example

# mkdir /mnt/iso
# mount -t iso9660 -o loop /home/users/raj/linux.iso /mnt/iso
Advertisements

Finding the Apache version

Posted: July 23, 2015 in HowTo
Tags: , , ,

Run the following command to find the version of Apache that is installed on Unix based systems. Please note, depending how Apache is installed you may need super user access to run this command.

# httpd -v

or

$ sudo httpd -v

Finding Files in IBM AIX

Posted: September 14, 2012 in HowTo
Tags: , ,

General syntax of “find” command

$ find <where> <condition> <action>

To get all files/directories in the current and sub directories

$ find .

To get all files/directories in the current and sub directories that were modified 5 (5*24 hours, to be precise) or fewer days ago

$ find . -mtime -5

To get all files/directories in the current and sub directories that were modified 10 or more days ago

$ find . -mtime +10

To get all files/directories in the current and sub directories that were modified exactly 15 days ago

$ find . -mtime 15

To delete all files/directories in the current and sub directories that were modified 30 or more days ago

$ find . -mtime 30 -exec rm -r {} \;

To delete all files in the current and sub directories that were modified 30 or more days ago

$ find . -mtime 30 -type f -exec rm -r {} \;

To delete all files with extension ‘log’ in the current and sub directories that were modified 30 or more days ago

$ find *.log -mtime 30 -type f -exec rm -r {} \;

 

 

Login securely to Unix servers

Posted: October 3, 2010 in HowTo
Tags: , , ,

To login to unix servers securely use the following command

$ ssh <userid>@<server>
userid – user id of the user to be logged in to the server
server – server to which user to be logged in

Example
$ ssh user1@server1

The assumption is that server to which user has to securely logged in is capable of accepting secured connections.