User Tools

Site Tools


os:linux:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
os:linux:start [2014-12-18 20:08] – external edit 127.0.0.1os:linux:start [2024-06-27 18:37] (current) Manuel Frei
Line 1: Line 1:
 ====== Linux ====== ====== Linux ======
  
 +  * [[os:linux:apt|APT]]
 +  * [[os:linux:kernel-tuning|Kernel-Tuning]]
   * [[os:linux:read_hfsplus|Read HFS+ Partition]]   * [[os:linux:read_hfsplus|Read HFS+ Partition]]
   * [[os:linux:multimedia|Multimedia]]   * [[os:linux:multimedia|Multimedia]]
 +  * [[os:linux:create_swap_file|Create Swap File]]
 +  * [[os:linux:powerdns_apache_postgresql_debian|PowerDNS via Apache2 with PostgreSQL on Debian and PowerDNS-Admin]]
 +  * [[os:linux:lemur_and_cfssl_with_nginx_and_postgresql_on_centos8:lemur_and_cfssl_with_nginx_and_postgresql_on_centos8]]
 +  * [[os:linux:file_watcher_service|File Watcher Service]]
 +  * [[os:linux:tmux|tmux]]
 +  * [[apps:systemd]]
  
-==== Backup directory ====+===== Backup directory =====
   rsync -vr /home/user/important_directory /media/some_hdd/backups/   rsync -vr /home/user/important_directory /media/some_hdd/backups/
  
 **Hint:** With a / at the end of the first directory, all sub directories are copied directly to the destination folder. Without / it will create the source folder (ex. important_directory) with all sub directories are copied to the destination folder **Hint:** With a / at the end of the first directory, all sub directories are copied directly to the destination folder. Without / it will create the source folder (ex. important_directory) with all sub directories are copied to the destination folder
  
-==== Forward Mails of A User ====+===== Forward Mails of A User =====
  
 You have a server for example and some mails are sent directly to root. The easiest way to forward them to a real address ist to create a .forward file. You have a server for example and some mails are sent directly to root. The easiest way to forward them to a real address ist to create a .forward file.
Line 29: Line 37:
 Jul  6 10:10:48 myHostName postfix/qmgr[24720]: 4E14342D46: removed Jul  6 10:10:48 myHostName postfix/qmgr[24720]: 4E14342D46: removed
 </code> </code>
 +
 +===== Validate XML Against Template =====
 +
 +<code>
 +xmllint --schema schema.xsd --noout file.xml
 +</code>
 +or
 +<code>
 +xmlstarlet val -s schema.xsd -e file.xml
 +</code>
 +
 +
 +===== fstrim =====
 +
 +On major Linux distributions (Debian, Rocky, ...), there is a sytemd timer for fstrim prepared but not activated per default. If you are using SSDs or virtual machines and your filesystem supports it, you can enable the timer to discard unused blocks once per week.
 +
 +Check if the timer is already enabled. If 0 timers are listed, it means it's not activated.
 +<code bash>
 +systemctl list-timers fstrim.timer
 +</code>
 +
 +Enable and immediately start the timer.
 +<code bash>
 +systemctl enable --now fstrim.timer
 +</code>
 +
 +<code - Example>
 +[root@server ~]# systemctl list-timers fstrim.timer
 +NEXT LEFT LAST PASSED UNIT ACTIVATES
 +
 +0 timers listed.
 +Pass --all to see loaded but inactive timers, too.
 +[root@server ~]# systemctl enable --now fstrim.timer
 +Created symlink /etc/systemd/system/timers.target.wants/fstrim.timer → /usr/lib/systemd/system/fstrim.timer.
 +[root@server ~]# systemctl list-timers fstrim.timer
 +NEXT                         LEFT        LAST PASSED UNIT         ACTIVATES
 +Mon 2024-07-01 01:28:50 CEST 4 days left -    -      fstrim.timer fstrim.service
 +
 +1 timers listed.
 +Pass --all to see loaded but inactive timers, too.
 +</code>
 +
 +===== Ubuntu Desktop to Ubuntu Server =====
 +
 +<code>
 +apt-get purge libx11.* libqt.*
 +apt-get autoremove
 +</code>
 +
 +Source: [[https://askubuntu.com/a/484464|askubuntu.com]]
 +
 +===== Links =====
 +  * [[https://eklitzke.org/stdout-buffering|Stdout Buffering]]
 +  * [[https://eli.thegreenplace.net/2018/measuring-context-switching-and-memory-overheads-for-linux-threads/|Measuring context switching and memory overheads for Linux threads]]
 +  * [[https://linoxide.com/how-to-check-disk-queue-length-in-linux/|How to Check Disk Queue Length in Linux]]
 +
os/linux/start.1418929734.txt.gz · Last modified: 2015-09-28 23:15 (external edit)