How to List File Size in Bytes or Megabytes in AIX

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
List the size of files used in AIX in whichever format you prefer.

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.

Advertisement

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.

Video of the Day

Step 2

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

Advertisement

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.

Advertisement

Advertisement

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.

Video of the Day

Advertisement

Advertisement

references

Report an Issue

screenshot of the current page

Screenshot loading...