|
| cool Statistics |
| | coolcommands: | 1338 | | Categories: | 83 | | Total queries: | 620081 | | Members: | 22813 | |
|
|
|
 |
|
|
Search coolcommands.com
 |
Submitted by:
daggilli   |
coolcommand
how to find disk partitions that are nearly full in a BSD-like system |
Description
df returns an array of mounted filesystem partitions with usage statistics. We don't want devfs pseudo-partitions, so filter them with grep -v:
# df | grep -v devfs
We want to skip the column headings in line 1 of the output and get the capacity and mount point of the rest. We want to remove the percent sign from the capacity. Awk and tr can do this:
# df | grep -v devfs | awk 'NR!=1 {print $5, $6}' | tr -d \\045
We want to see the mountpoints of partitions that are 99% full or more. Use awk again:
# df | grep -v devfs | awk 'NR!=1 {print $5, $6}' | tr -d \\04 | awk '{if($1>98.5) print $2}' |
Example
df | grep -v devfs | awk 'NR!=1 {print $5, $6}' | tr -d \\04 | awk '{if($1>98.5) print $2}' |
Return to search results
 |  |  |  |
Random coolcommands
coolcommand: mkfifo - how to create first-in-first-out (FIFO) special files
Example: mkfifo -m 644 /tmp/myfifo
[show me the details] |
coolcommand: query_partition_names - get the names of all the partitions of a managed system on a HMC
Example: query_partition_names –m < managed_system >
[show me the details] |
coolcommand: swap - to get swap information in Sun Solaris
Example: swap -s; swap -l
[show me the details] |
coolcommand: signals used in unix (example from IBM AIX)
Example: unix signals; kill -l
[show me the details] |
|
|
coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts
|  |  |  |  |
|
|
|
|
 |
|
|
|
Top 5 Submitters
|
|---|
| lvo | 1160 |
| audet | 37 |
| kah00na | 32 |
| Mariom | 24 |
| lebjf000 | 14 |
Top 5 Searches
|
| Category Solaris | 51939 |
| Category AIX | 49005 |
| Category General UNIX | 47498 |
| solaris | 23554 |
| aix | 22739 |
|
|
|
|