uav
  • Member for 4 years, 6 months
  • Last seen this week
  • Bad Homburg vor der Höhe, Bad Homburg, Germany
Disable Ctrl+C in GNU screen?
Accepted answer
3 votes

Now I've found the answer myself. The instructions defscrollback 30000 bindkey "^C" echo 'Blocked. Please use [Ctrl]+[A] + [Ctrl]+[Enter] + [Y]' bindkey "^D" echo 'Blocked. Please use [Ctrl]+[A] + [...

View answer
Only 1024 bytes for each /etc/environment variable :( -> rebuilding pam with larger limits?
Accepted answer
3 votes

Rebuilding PAM with larger limits Execute scripts as normal user with sudo privileges. Script for Ubuntu with BZR (= Bazaar) (really untested!) Create file with vi build_pam_via_ubuntu_and_bzr.sh, ...

View answer
Replace split with explode in all PHP files
2 votes

In the meantime, I figured it out myself. find . -iname '*.php' -type f -exec grep -l -m 1 -P '[<][?]' {} \; | xargs -r grep -l -m 1 --null -P '[^_.]split[\s]*[(]' | sudo xargs -0 -r perl -pi -e '...

View answer
Command to reboot machine when no users are logged in?
1 votes

Nearly three years late. Found via Google. For the one-liner fans. For sudo crontab -e: 26 */3 * * * [ -z "$(/usr/bin/who)" ] && /sbin/reboot Reboot every third hour by 26 minutes ...

View answer
"File B with file names" minus/without "file A with file names" aka "what was deleted in A"?
0 votes

I came up with: MY_SOURCE=A_files.txt readarray -t MY_TARGET_ARRAY < B_files.txt for LINE in "${MY_TARGET_ARRAY[@]}"; do if ! grep -q "${LINE}" "${MY_SOURCE}"; ...

View answer