September 11

Useful Linux commands for handling directory has large amount of files

Count folder with number of files:

ls . | wc -l

A typical way to handle the “argument list too long” error is via the find command. Delete all files with sess* 

find .  -maxdepth 1 -mindepth 1 -type f -name "sess*" -delete

tip: handle large sessions folder for php:

rm -rf sessions; mkdir sessions;  chmod 1733 sessions;

Send us a message. We will reply as soon as we can.