Basic Unix AIX Commands

Adil Abdullah
3 min readNov 21, 2022

To check all groups and associated username
lsgroup all

For restarting broker
mqsistop IB1T15BR
mqsistart IB1T15BR

To check overall AIX logs this should be in seperate window
cd var/logs/broker.log
tail -f broker.log

To check all groups and associated username
lsgroup all

To open file in readonly mode
cat <filename>

To check profile file in AIX

cd /home/appl/ibtest15
cat ./.profile

To check path where you are standing
pwd

To check memory
lsdev -C| grep mem
— to check memory
lsattr -El mem0

To get location of conf file of broker and server
/var/mqsi/components/IB1T15BR

To give permission to user on folder
r=read
w=write
x=execute

u=user
g=groups
o=other

chmod u+rwx <username>
chmod u+rwx <path of folder>

rcp -n BIOV107 ‘broker.log’>’C:\AdilAbdullah.broker.txt’

To check the permission on folder
ls -ld <path>

To provide the permission
Provide 1777 permission to /tmp and crw-rw-rw- (0666) to /dev/null to resolve this issue.
chmod 1777 <path>
chmod crw-rw-rw- <path>

To create new file
1. Using touch to create a text file: $ touch NewFile.txt.
2. Using cat to create a new file: $ cat NewFile.txt. …
3. Simply using > to create a text file: $ > NewFile.txt.
4. Lastly, we can use any text editor name and then create the file, such as:

To edit the file
vi <filename>
esc
:wq — save and quit

Shift+zz — Save the file and quit
:w — Save the file but keep it open
:q — Quit without saving
:wq — Save the file and quit

To rename file
mv <old name> <new name>

To delete the file named myfile, type the following:
rm <filename>

To delete all the files in the mydir directory, one by one, type the following:
rm -i <direcotry name>/*

To move a file to another directory and give it a new name, enter:
mv <filename> <directory name>/<file new name>

To move a file to another directory, keeping the same name, enter:
mv <filename> <directory name>

To move several files into another directory, enter:
mv chap4 jim/chap5 /home/manual

To download file from AIX (Run from windows CMD)
scp ibtest15@xyz.com:/etc/syslog.conf .

To upload file in AIX (Run from windows CMD)
scp C:\AdilAbdullah\Application-List.txt ibtest15@xyz.com:/home/appl/ibtest15/adil

To check os name and lavel
oslevel -r

To check file/directory size in GB and MB
du -gs <filename> — — For GB
du -ms <filename> — — for MB

To check details about file
istat <filename/directory>

To check username
who
whoami

To create and remove directory
mkdir <directory-name> — — to create

To check history
history

To move into bash terminal
bash

To list all files in the file system with the name .profile, type the following:
find / -name .profile

To list files having a specific permission code of 0600 in the current directory tree.
find . -perm 0600

To search several directories for files with certain permission codes.
find . -ctime 1

To list all files in the current directory that have been changed during the current 24-hour period, type the following:
find . -size 414c

To search for regular files with multiple links.
find . -type f -links +1

To search for all files that are exactly 414 bytes in length.
find . -size 414c

--

--

Adil Abdullah

Currently working as Full stack Java developer at Contour Software at their Easit AB division part of Jonas group. Working on Java and IBM stack.