Showing posts with label bashshell. Show all posts
Showing posts with label bashshell. Show all posts

Tuesday, January 12, 2010

Count number of files of certain size


find ./ -size 0k | grep "sess_" -c

This finds the files and directories matching a path and matching a size.
Can use -size +[number]k (above a certain size) or -size -[number]k (below a certain size), or a size match.
Then it pipes that to a grep for the word "sess_" and returns a count.
Helps us count the enormous number of blank sessions that our app is generating on OSX.

Wednesday, December 23, 2009

To count the number of session files in a directory

count number of session files in a directory:

ls -l | grep "sess_" -c

Tuesday, January 27, 2009

VIM tutorial

nice that vim comes with an interactive tutorial. Perhaps I'll finally remember how to go between edit and command mode.

Just open a terminal, and $ vim tutorial