Posts Tagged 'zsh'

Shell: Get Partition With Max Disk Space

I wanted to find the partition that has the maximum disk space and it’s mount point. This is the script that Anuj and I (mostly Anuj) came up with.

Explanations:

  • df gives us the disk space.
  • The first awk sorts all the lines numerically based on the 2nd column, starting from the second line.
  • The second awk prints the 6th column which gives the mounted partition information.
  • Finally the combination of head and tail gives us the top result.

Continue Reading ?
0

Recursively Remove .svn Folders

I was moving my svn projects to git repository. I needed to get rid of all the .svn folders recursively. Following is the script that I used:

Popularity: 1% [Continue Reading ?

0