If you have a big home drive and want to search only in the hidden folders, use this command:
find . -path '*/\.*' -name <filename>
Zufällig gesammelte Themen
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
If you have a big log folder and you want to tar the newest log files in to one tar.gz file, then you can use the following:
find /opt/tomcat/logs/ -type f -newermt 2013-06-09 | tar cvzf testfind.tar.gz -T - --null
I do not know the meaning of -T - --null
, but it works.
Perhaps your find version is to old for the newermt
statement. With find version 4.2.27 it did not work. Then you could use -mtime
, for modification time.
mtime
is the number * 24 h, do find all files older newer then one day, you can use:
find /opt/tomcat/logs/ -type f -mtime 1
+1 would mean older than one day
This tutorial shows how to upgrade PostgreSQL from 9.4 (openSUSE 42.2) to 9.6 (openSUSE 42.3)
systemctl stop postgresql.service
systemctl disable postgresql.service
zypper -n install postgresql96 postgresql96-server postgresql96-contrib
mv /var/lib/pgsql/data/ /var/lib/pgsql/data94/
su postgres -c "mkdir /var/lib/pgsql/data"
systemctl enable postgresql.service
systemctl start postgresql.service
systemctl stop postgresql.service
su - postgres -c "pg_upgrade -b /usr/lib/postgresql94/bin/ -B /usr/lib/postgresql96/bin/ -d /var/lib/pgsql/data94/ -D /var/lib/pgsql/data"
cp /var/lib/pgsql/data94/pg_hba.conf /var/lib/pgsql/data
systemctl start postgresql.service
# psql -U postgres
psql (9.6.4)
Type "help" for help.
postgres=# \q
/var/lib/pgsql/delete_old_cluster.sh
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
endif
nginx.conf for Vim
https://gist.github.com/2called-chaos/5073996
#!/bin/sh
mkdir -p ~/.vim/syntax/
cd ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394
mv download_script.php\?src_id\=19394 nginx.vim
cat > ~/.vim/filetype.vim << EOF
au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif
EOF