Linux: /usr/bin/rm: Argument list too long


If you’ve ever gone in to a directory, for example a mail or log directory, and wanted to clear it of its contents, but faced an error like this:

/bin/rm: cannot execute [Argument list too long]

We have a solution for you. It’s nice and simple, and easy to remember. Paste and run the command in the relevant directory to have it sniff out files in batches of 200 at a time, delete them, then search again until the directory is empty.

echo * | xargs -n 200 rm

You might also want to recursively delete all sub-directories / sub-folders too, in which case you’d add -rf (recursive, force) on the end, like so:

echo * | xargs -n 200 rm -rf

You can also adapt the command to look for particular extensions or strings, for example:

echo *.txt| xargs -n 200 rm

This will search through all files, list the first 200 files with .txt extension, delete them, and then keep searching until it’s gone through the entire directory removing all files that have the .txt extension on them.

How to Install the latest OpenSSL version from Source on Linux (Debian)

In this tutorial, I will show you step by step how to install the latest stable OpenSSL version from source on Debian servers.

Continue reading “How to Install the latest OpenSSL version from Source on Linux (Debian)”

Fixing postfix and saslauthd: cannot connect to saslauthd

If you are having issues getting postfix email server to authenticate with saslauthd, your solution might be found in a missing symlink. Remember that postifx runs in a chroot environment. Continue reading “Fixing postfix and saslauthd: cannot connect to saslauthd”

Otkriveni propusti u Intelovim čipovima i čipovima drugih proizvođača

Ozbiljni sigurnosni propusti na računarskim procesorima Intela i drugih proizvođača čipova mogli bi da omoguće zloupotrebe lozinki i drugih osetljivih podataka iz memorije sistema, saopštili su stručnjaci tehnološke kompanije Gugl. Continue reading “Otkriveni propusti u Intelovim čipovima i čipovima drugih proizvođača”

Let’s Encrypt – open source SSL – enkripcija za DŽ

Internet prezentacije postaju sve više interaktivnije. Nekada su to bile fiksne strane, informativnog karaktera, sada sajtovi traže više akcija od strane korisnika. Neminovnost je da korisničke podatke treba zaštitii, a jedan od načina je upotreba SSL sertifikata. Continue reading “Let’s Encrypt – open source SSL – enkripcija za DŽ”

Scanning for malware with Linux Malware Detect (LMD)

Linux Malware Detect (LMD), also known as Maldet, is a malware scanner for Linux released under the GNU GPLv2 license. It is particularly effective for the detection of php backdoors, darkmailers and many other malicious files that can be uploaded on a compromised website. It will help you do detect infected websites and clean the infection, however securing the compromised user or website is still necessary to avoid re-infection. Continue reading “Scanning for malware with Linux Malware Detect (LMD)”