Linux user quotas can be edited with the commands edquota or setquota on the shell. While edquota opens the quota settings in a editor like vim, setquota allows you to specify the quota settings on the commandline. Example for disabling the quota for the user "testuser": setquota -u testuser 0 0 0 0 -a Example ... Read more
When you copy files from a older Linux or Windows system to a new Linux system, the filenames can get broken and have to be converted. Handy tool to translate the charset of filenames is convmv. Example convmv -f iso-8859-15 -t utf8 -r /var/www/myhome.lan/web/images/* Your Perl version has fleas #37757 #49830 Starting a dry run without ... Read more
When you run rkhunter on Debian Linux, you might get a warning when rkhunter is checking for hidden files and directories that some Hiffen files were found in /proc. A closer investigation in rkhunter might bring up the filenames /dev/.static, /dev/.udev and /dev/.initramfs which are normal files on Debian and not related to a attack ... Read more
Today I tested the logrotation of a Linux server installation and therefore I needed a logfile that was larger then 10 MB. To create such a file of e.g. 11 MB size on the shell, I used this command: dd if=/dev/urandom of=test.log bs=1M count=11 The content of the file are random characters. If you need ... Read more
Have you ever executed a command on the shell and noticed that you had to run it with sudo? Instead of typing the command again with "sudo" in front of it, just run: sudo !! which will execute the command that was run before with sudo. Thanks to Planetfox for this tip.
If a process is shown with process state "D" in tools like ps or top, then it's an uninterruptable process. Example: ps axl | grep D F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 104 2579 9109 20 0 5024 2116 refrig D ? 0:00 cleanup -z -t unix ... Read more
Sometimes you need to know to which debian or ubuntu package a specific file belongs, e.g. because you deleted a system file and want to reinstall it. There is a handy utility called apt-file which searches for a filename in all debian packages. Installation apt-get install apt-file Usage example search for the file /etc/sysctl.conf apt-file ... Read more
The winmail.dat file is a container file format used by Microsoft Outlook to send attachments in rich-text formatted emails. To open winmail.dat on Linux, use the tnef utility. Installation sudo apt-get install tnef Usage Open a shell window, navigate to the directory where the winmail.dat file is saved, then execute the command: tnef winmail.dat to ... Read more