Source: https://unix.stackexchange.com/a/194058/223965
Two days back:
journalctl --vacuum-time=2d
Retain only the past 500 MB:
journalctl --vacuum-size=500M
Zufällig gesammelte Themen
Source: https://unix.stackexchange.com/a/194058/223965
Two days back:
journalctl --vacuum-time=2d
Retain only the past 500 MB:
journalctl --vacuum-size=500M
To get the checksum of a string, use this.
echo -n "yourstring" |md5sum
echo -n "yourstring" |sha1sum
echo -n "yourstring" |sha256sum
source Stackoverflow
If you want to have the original Oracle JDK instead of OpenJDK, follow this:
tar xvzf jdk-8u191-linux-x64.tar.gz --directory=/opt
update-alternatives --install \
/usr/bin/java java /opt/jdk1.8.0_191/bin/java 20000 \
--slave /usr/bin/keytool keytool /opt/jdk1.8.0_191/bin/keytool \
--slave /usr/bin/orbd orbd /opt/jdk1.8.0_191/bin/orbd \
--slave /usr/bin/pack200 pack200 /opt/jdk1.8.0_191/bin/pack200 \
--slave /usr/bin/policytool policytool /opt/jdk1.8.0_191/bin/policytool \
--slave /usr/bin/rmid rmid /opt/jdk1.8.0_191/bin/rmid \
--slave /usr/bin/rmiregistry rmiregistry /opt/jdk1.8.0_191/bin/rmiregistry \
--slave /usr/bin/tnameserv tnameserv /opt/jdk1.8.0_191/bin/tnameserv \
--slave /usr/bin/unpack200 unpack200 /opt/jdk1.8.0_191/bin/unpack200
update-alternatives --config java
java -version
update-alternatives --remove "java" "/opt/jdk1.8.0_151/bin/java"
rm -r /opt/jdk1.8.0_151/bin/java
To avoid to have a big catalina.out log file, create a file /etc/logrotate.d/tomcat with this content:
#logrotate for catalina.out
/opt/tomcat/logs/catalina.out {
daily
copytruncate
rotate 4
size 5M
compress
missingok
}
To test logrotate script, use this (without "-d" the rotation run):
/usr/sbin/logrotate -d /etc/logrotate.d/tomcat
If you have a big home drive and want to search only in the hidden folders, use this command:
find . -path '*/\.*' -name <filename>
Sign vboxdrv so Secure Boot has no problem with it. (Source AskUbuntu)
Short version:
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ~/.ssh/MOK.priv .ssh/MOK.der $(modinfo -n vboxdrv)
To create the keys MOK.priv and MOK.der, this steps are required:
# create key pair
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Signing Key for Secure Boot/"
# use mokutil to test, if the key is enrolled (should not, if you just created it)
mokutil --test-key .ssh/MOK.der
# import key
sudo mokutil --import .ssh/MOK.der
# sign vboxdrv
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 .ssh/MOK.priv .ssh/MOK.der $(modinfo -n vboxdrv)
# check vboxdrv and activate
sudo modinfo -n vboxdrv
sudo modprobe vboxdrv
If you have a lot of open windows, then the task list could run out of space. The grouping of the windows is a good feature to don't loose the overview.
This is what I mean with "grouping":

There is a good Applet called Icing Task Manager. Install steps:


If you e.g. can't unmount because a file is busy, then you could find it with this command:
lsof | grep <path>
Replace <path> with your mount point, so you see which program uses your mount point.
lsof has this columns:
COMMAND PID TID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Good questions to ask if you want to hire a Linux Sysadmin.
Or good questions to ask yourself before before applying to a new job.
Ha a look at: trimstray/test-your-sysadmin-skills
Simply run
df -h | grep -v tmpfs
-v inverts the grep