Linux

1. Format file from window to linux.

shell: dos2unix ${fileName}

vi: :set ff=unix

2. Calculate file number

Calculate file number in directory includes sub directory

ls -lR|grep "^-"|wc -l 

Calculate directory number in folder includes sub directory

ls -lR|grep "^d"|wc -l

相关推荐