<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vinit Kumar</title>
    <description>The latest articles on DEV Community by Vinit Kumar (@vinitkumar).</description>
    <link>https://dev.to/vinitkumar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1030%2F537678.png</url>
      <title>DEV Community: Vinit Kumar</title>
      <link>https://dev.to/vinitkumar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vinitkumar"/>
    <language>en</language>
    <item>
      <title>Clean Up Your Mac From Other Files</title>
      <dc:creator>Vinit Kumar</dc:creator>
      <pubDate>Mon, 02 Jan 2017 07:08:03 +0000</pubDate>
      <link>https://dev.to/vinitkumar/clean-up-your-mac-from-other-files</link>
      <guid>https://dev.to/vinitkumar/clean-up-your-mac-from-other-files</guid>
      <description>

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DJmdweoM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cldup.com/-iOX0p9Ob8-3000x3000.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DJmdweoM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cldup.com/-iOX0p9Ob8-3000x3000.png" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sometimes, your mac  is filled up with files and you can't seem to&lt;br&gt;
understand what really is taking much space. Here is how you can find out. &lt;/p&gt;

&lt;p&gt;First of all  find disk usage and save it to a log file. Also, find all&lt;br&gt;
big files that are there. Grepping  using 'G' would find all files that are in&lt;br&gt;
GB.&lt;/p&gt;

&lt;p&gt;Also, save the second list to another file so that we are only doing it once.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; ~/space.log
&lt;span class="nb"&gt;cat&lt;/span&gt; ~/space.log | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print $1}'&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s1"&gt;'G'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;  ~/highspace.log
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Next,  open a split window and do &lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/highspace.log
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And Now, start finding the ones which are big one by one. &lt;/p&gt;

&lt;p&gt;Let's say one of the entry was 5.6G, Let's find which one was it. &lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;cat&lt;/span&gt; ~/space.log | fgrep &lt;span class="nt"&gt;-f&lt;/span&gt; highspace.log

 &lt;span class="c"&gt;#It will give something like this:&lt;/span&gt;

1.2G    ./.android/avd/Nexus_6_API_21.avd
2.7G    ./.android/avd
2.7G    ./.android
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, if you feel the file is not needed and you want to delete it. Do the&lt;br&gt;
following:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; Documents/Movie.avi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Voila! Repeat this process and remove all files and directories that you  no&lt;br&gt;
longer need.&lt;/p&gt;

&lt;h1&gt;
  
  
  Disclaimer:
&lt;/h1&gt;

&lt;p&gt;Do it very patiently  and backup everything that's important. This guide is for&lt;br&gt;
very advanced users and  you should only do it if you know what you are doing.&lt;br&gt;
I am not responsible for any data loss. Do it at your own risk.&lt;/p&gt;


</description>
      <category>mac</category>
      <category>cleanup</category>
      <category>commandline</category>
      <category>expert</category>
    </item>
  </channel>
</rss>
