<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: verif disk usage in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/verif-disk-usage/m-p/4792004#M59822</link>
    <description>df -HP|awk '{if (NR!=1 &amp;amp;&amp;amp; $5 == "13%") print $6 "\t" $5}'&lt;BR /&gt;&lt;BR /&gt;This will output the filesystem and its usage only if the usage is exactly 13%.&lt;BR /&gt;&lt;BR /&gt;Is this something you need?</description>
    <pubDate>Fri, 27 May 2011 16:33:31 GMT</pubDate>
    <dc:creator>Wilfred Chau_1</dc:creator>
    <dc:date>2011-05-27T16:33:31Z</dc:date>
    <item>
      <title>verif disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/verif-disk-usage/m-p/4792001#M59819</link>
      <description>Hello,&lt;BR /&gt;i look for script to verify disk usage&lt;BR /&gt;on linux server,&lt;BR /&gt;i start with ' df -H | grep -vE '^Filesystem|tmpfs|cdrom '&lt;BR /&gt;but now i want to extract just&lt;BR /&gt;pattern with a "%" in line, &lt;BR /&gt;like "13%" for example.&lt;BR /&gt;Thanks a lot</description>
      <pubDate>Wed, 25 May 2011 11:16:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/verif-disk-usage/m-p/4792001#M59819</guid>
      <dc:creator>iranzo</dc:creator>
      <dc:date>2011-05-25T11:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: verif disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/verif-disk-usage/m-p/4792002#M59820</link>
      <description>If I understood correctly what you're looking for, you want just the Use% part of each line.&lt;BR /&gt;It's the 5th whitespace-separated "word" on the line, so awk can pick it out nicely.&lt;BR /&gt;&lt;BR /&gt;However, some versions of df will add a line feed after the device name if the name is so long it would push the columns out of alignment. To avoid this, add option -P to the df command:  &lt;BR /&gt;&lt;BR /&gt;df -PH | grep -vE '^Filesystem|tmpfs|cdrom ' | awk '{ print $5; }'&lt;BR /&gt;&lt;BR /&gt;You can even pick multiple columns, in any order you wish. For example, to output the name of the mount point and its Use% value only:&lt;BR /&gt;&lt;BR /&gt;df -PH | grep -vE '^Filesystem|tmpfs|cdrom ' | awk '{ print $6, $5; }'&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Wed, 25 May 2011 12:42:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/verif-disk-usage/m-p/4792002#M59820</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-05-25T12:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: verif disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/verif-disk-usage/m-p/4792003#M59821</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt; You can also make use of python, use the os module ( i need to search for the exact function), search the python documentation. Then you can generate reports, make a cool ui etc&lt;BR /&gt;&lt;BR /&gt;I prefer python over traditional shell scripts since python scripts tend to be more maintainable. But that's just me!.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;--Lucifer</description>
      <pubDate>Wed, 25 May 2011 14:44:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/verif-disk-usage/m-p/4792003#M59821</guid>
      <dc:creator>Lucifer Megacruel</dc:creator>
      <dc:date>2011-05-25T14:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: verif disk usage</title>
      <link>https://community.hpe.com/t5/operating-system-linux/verif-disk-usage/m-p/4792004#M59822</link>
      <description>df -HP|awk '{if (NR!=1 &amp;amp;&amp;amp; $5 == "13%") print $6 "\t" $5}'&lt;BR /&gt;&lt;BR /&gt;This will output the filesystem and its usage only if the usage is exactly 13%.&lt;BR /&gt;&lt;BR /&gt;Is this something you need?</description>
      <pubDate>Fri, 27 May 2011 16:33:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/verif-disk-usage/m-p/4792004#M59822</guid>
      <dc:creator>Wilfred Chau_1</dc:creator>
      <dc:date>2011-05-27T16:33:31Z</dc:date>
    </item>
  </channel>
</rss>

