How to List File Size in Bytes or Megabytes in AIX

By Eric Brown

Advanced Interactive Executive (AIX) is an operating system developed by IBM, based on the Unix system structural design. AIX runs and utilizes the entire collection of standard Unix and Linux commands. It enables users to manage the ls command in combination with various flags to complete many tasks, such as displaying the file size of individual files or a group of selected ones.

Step 1

Double-click the "Terminal" icon located on the Windows desktop, or go to the Applications/Accessories menu area, then click the "Terminal" icon provided on the displayed list. Log in to the AIX system.

Step 2

Type "cd [directory]". Press the "Enter" key. Where [directory] is listed, substitute the desired directory name. For example, cd workfiles.

Step 3

Type "du -a -m" then press the "Enter" key. This action will display the file size in megabytes for the files located in the current directory. Or type "du -a" then press "Enter." This will display the file size in bytes for the files located in the current directory.The syntax for the command is du [flags][files]. Where "du" is the command that displays the number of blocks used for files, [flags] is the requested result displayed for the command and [files] are the individual files listed concerning the command.

References & Resources