12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

406CHAPTER 20Monitoring System ResourcesTo display the information in an easier-to-read format (megabytes, gigabytes, andterabytes), use the -h argument. To display only the grand total for the current directorywithout the usage for each subdirectory, use the -s argument. Combine these two argumentswith the du -hs command, and only the grand total for the current directory isdisplayed in megabytes or gigabytes.To determine the size of just one file, provide it after the du command such asdu /vol1/group1/examplefileThe value is given in kilobytes unless the -h option is used:du -h /vol1/group1/examplefileIf you prefer a graphical program to determine disk usage, open the file browser by selectingHome Folder or Desktop from the Places menu on the top panel of the desktop (seeFigure 20.2).FIGURE 20.2Graphical Display of File SizeThe name, file type, size, location, MIME type, last modified date, and last accessed dateare shown for the file. If a directory is selected instead, folder is shown as the file type.Also, the number of items in the folder, size of all the files and directories in the directory,location, volume, free size, and last modified date are displayed.Reporting Open FilesThe lsof command can be used to list open files, including library and network files. Ifan error occurs because a device is already in use, lsof can be used to determine whichprocess is using it and who owns that process. By default, all open files for all activeprocesses are listed. Use the grep command to search for a specific file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!