Technical
Solve Argument List Too Long With Ruby

While trying to clear tmp folder from my session files i got the following bash: /bin/rm: Argument list too long, following couple lines of ruby helped me to solve that.


cd /tmp
irb
Dir.entries(".").each{|file| `rm -rf #{file}` if File.file?(file)}