Hacker News new | past | comments | ask | show | jobs | submit login

'ls -A | wc -l' will spare you having to account for the '.' and '..' lines. Omitting the '-l' (redundant for your case) also spares the "totals" line.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: