You are on page 1of 4

Basic AIX Commands

CD
Change Directory
$ cd /
$ cd ..
PWD
Present Working Directory
$ pwd
HOSTNAME
Yours machine name
$ hostname
CLEAR
Clear the whole screen
$ clear
LS
Show the complete list
-l (long format)
-a (list . files too)
-r (reverse order)
-t (newest appears first)
$ ls l
$ ls -alt
CP
Copies a file from one location to another.
-f(to force the copy to occur)
-r(to recursively copy a directory)
$ cp /tmp/basharat /tmp
MV
Move a file from one location to another. And rename the file.
-f (to force the move to occur)
$mv basharat /tmp/basharat
RM
Remove a file
-f(to force the removal of the file)
-r(to recursively remove a directory)
Remove all *.unl files in /tmp/bash
$rm filename

CAT
Print a file to stdout(screen)
$cat filename
CHMOD
Change the file permissions
$Chmod 666 filename
R=4, w=2, x=1
CHOWN
Change ownership of a file.
MKDIR
Creates a directory
$mkdir /tmp/basharat
RMDIR
Remove a directoy
$rmdir /tmp/basharat
VI
The standard operating system text-file editor.
$vi filename
To add someone in the file (Esc+I)
Remove some one from the file (Esc+x)
Who
List users who are currently logged on (useful with option am I -i.e. who am I or
whoami)
PS
List processes currently running, by default on the current shell. Useful with
options.
-ef (show all processes)
Uname a
Will show you what machine you are currently on.
DATE
Show current date and time.
LAST (username)
Shows a list of recent login of user.

KILL (Signal, process)


Sends a signal (normally a kill) to a process. Kill-9 terminates the job no questions
asked.
DF
List volume groups + usage
LSCFG
Show all connected devices.
LSVG
List volume groups
LSPV
List physical disks
SHUTDOWN
Shutdown the server so that it may be switched off. Rather obviously, this may only
be run by root.
-f(shuts the system down immediately) few minutes will take for this.
-R(reboot the system immediately after half)
OSLEVEL
Show the current revision of the operating system.
EXIT
End current shell process. If you log in, then type this command, it will return you to
login.
FTP
File transfer protocol a quick and easy method for transferring files between
machines.
SU
Switch user
$su root
$suroot
TAR
Read/Write stuff to archive.
$tar cvf filename (make the archive)
$tar xvf d01.tar (extract the file).

SCP
Securely transferring computer files between a local host and a remote host or
between two remote hosts. It is based on the secure shell protocol.
$ Scp sourcefile user@hostip:directory/targetfile.
$ scp r user@hostip:directory/sourcefolder targetfolder
REBOOT
Reboot the system
$reboot
FIND
Find the files (Search the files)
$Find name (filename)
$find *-name(filename)
$find . name(filename)

Select pool, round(bytes/1024/1024.0) free_memory_in_mb from v$sgastat where


name like %free memory%;
Desc v$sga
Desc v$sgastat
Show sga
SELECT * FROM V_$SGA_TARGET_ADVICE;
SELECT * FROM V_$PGA_TARGET_ADVICE;

Select * from v$parameter where name like %undo%;


How to set the date and time in linux
# date -s "2 OCT 2006 18:00:00"
date --set="STRING"

You might also like