AIX 5L Basics (Unit 04) – Files and Directories

Everything is a file in AIX
There are no file extensions enforced by AIX such as .txt or .doc etc.

Three types of files in AIX:
1. Ordinary – Text or Binary
2. Directories – “Filename, Inode” – A table of contents, stores a list of files and their inodes)
3. Special Files – Devices (device files are stored in the /dev directory)
/dev/cd0 – cdrom drive
/dev/lp – printers
/dev/rmt0 – tape drives (raw magnetic tape)
/dev/fd0 – floppy disks
/dev/hdisk0 – hard disk drives

/proc (processes stored in ram)


Relative Paths:
./wltest – . = current directory
../wltest – ..= parent directory
../../ – move up two levels

pwd – print working directory
ls – list the files in the directory
ls -a – list “all” files including hidden files (.profile etc.)
ls -R – List “recursively” all files to the end of the tree structure
ls -l – “Long” listing of files
ls -li – inode and long listing of files
ls -d – List directory information
istat wltest – List directory information

cd – move to home directory /home/wltest
mkdir – create directory
rmdir – remove directory
mkdir -p /dir1/dir2/dir3 – Creates /home/wltest/dir1/dir2/dir3
mkdir dir1 dir2 dir3 – Creates /home/wltest/dir1, /home/wltest/dir2 …
touch filename filename – Creates a zero byte file

Leave a Reply

Your email address will not be published. Required fields are marked *