coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Sunday May 19, 2013


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?

Who's Online
We have 25 guests online

Newest Member

nbewwmbxog

Hit Counter
11537442 Visitors

cool Statistics
coolcommands:1338
Categories:83
Total queries:620081
Members:22813





Search coolcommands.com
Search Keyword:


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



FREE
myPMS

Password
Management
System

by

LVOware.com




Top 5 Submitters

lvo1160
audet37
kah00na32
Mariom24
lebjf00014

Top 5 Searches

Category Solaris51939
Category AIX49005
Category General UNIX47498
solaris23554
aix22739

Terms of Use
Privacy
Contact


 
coolcommands.com © 2013. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum