Archive

Archive for the ‘Linux’ Category

Linux: Recursively delete all files with a given extension

January 20th, 2015

please use find:

find . -type f -name '*.bak' -delete

Linux

Size of directory tree

February 14th, 2012

This is a simple script for Linux to check size of a directory and sub-directories :

1. check size of a current directory with sub-directories:

du –block-size=M  | sort  -n

2. check size of /home/user/alex directory with sub-directories:

du –block-size=M   /home/user/alex | sort  -n

3. check size of /home/user/alex directory with depth=2 sub-directories:

du –block-size=M  –max-depth=2  /home/user/alex | sort  -n

 

 

bioinformatics, Linux ,