Skip to content

SysTutorials

  • Tutorials
  • Linux
  • Linux Manuals
  • Systems
  • Programming
  • Software
  • Subscribe
  • Search
SysTutorials

  • QA | Tutorial

    Find broken links on my site

    ByEric Ma Mar 24, 2018Nov 22, 2019

    There are lots internal and external links on my site. Unfortunately, some of them are broken over years. How to find out all these broken links on my site? I use this tool http://www.brokenlinkcheck.com/ which can detect the broken links well. More info here: Broken links checker for sites

    Read More Find broken links on my siteContinue

  • QA

    How to use LVM groups with libvirt

    ByQ A Mar 24, 2018Oct 7, 2019

    libvirt uses files for VM images by default under /var/lib/libvirt/images/. LVM is a convenient tool for managing VM images. How to use LVM groups with libvirt? This post discusses the method to add LVM groups as a storage pool for libvirt: http://ailoo.net/2011/02/use-a-lvm-volume-group-with-libvirt/ For a general introduction of the storage management in libvirt, please check: http://libvirt.org/storage.html

    Read More How to use LVM groups with libvirtContinue

  • QA

    How to use different keys for different git servers?

    ByQ A Mar 24, 2018

    I have access to different git servers. I have several keys for these servers. How to use different keys for different git servers? Use the .ssh/config file to specify different configuration for different SSH servers used by git: For example: Host git.example.org Port 22111 IdentityFile ~/.ssh/id_rsa.git.example.org Host code.example.org Port 22 IdentityFile ~/.ssh/id_rsa.code.example.org which specifies the…

    Read More How to use different keys for different git servers?Continue

  • QA

    Linux timer sources

    ByQ A Mar 24, 2018

    Linux supports different timer sources and a machine can have multiple ones. How to find the available Linux timer source and the current one used? Find the current timer source: $ cat /sys/devices/system/clocksource/clocksource0/current_clocksource Find all available timer sources: $ cat /sys/devices/system/clocksource/clocksource0/available_clocksource

    Read More Linux timer sourcesContinue

  • QA

    How to install sbt for scala on Fedora Linux

    ByQ A Mar 24, 2018

    How to install sbt for scala on Fedora Linux? It is not included in the default Fedora repository although scala is included. The download page of scala-sbt.org provides the RPM package. You can install the sbt rpm package by yum. We only need the URL to the RPM package. Here, let take version 0.13.1 as…

    Read More How to install sbt for scala on Fedora LinuxContinue

  • QA

    How to find out which function causes Exception “Stack_overflow” in OCaml

    ByQ A Mar 24, 2018

    My OCaml program prints: Fetal error: Exception “Stack_overflow” without any further information. How to find out which function causes this “Stack_overflow” exception? First, recompile your OCaml program with -g. Second, rerun your OCaml program with OCAMLRUNPARAM=b and the backtrace will be printed out after the “Stack_overflow” exception.

    Read More How to find out which function causes Exception “Stack_overflow” in OCamlContinue

  • QA

    Import Evolution mail directory to Thunderbird/imap account

    ByQ A Mar 24, 2018

    I have some old emails left in the Evolution local directory (unfortunately not in the mail server’s imap directory). So how to import the Evolution directory which contains some files for the emails to Thunderbird so that I can copy them to the imap directory if needed? You can do this in two steps: First,…

    Read More Import Evolution mail directory to Thunderbird/imap accountContinue

  • QA

    Remove trailing spaces at the end of each line in a file

    ByQ A Mar 24, 2018

    How to remove trailing spaces at the end of each line in a file on Linux? Use this script with sed: cat your_file | sed ‘s/[[:blank:]]+$//g’

    Read More Remove trailing spaces at the end of each line in a fileContinue

  • QA

    utop key bindings / key shortcuts

    ByQ A Mar 24, 2018

    utop is an improved toplevel for OCaml supporting line edition, history, real-time and context sensitive completion, colors and etc. utop is convenient to use. However, the key bindings are a little bit different from the ones with GNU readline. What are all the key bindings? The #utop_bindings command will print all the key bindings. Here…

    Read More utop key bindings / key shortcutsContinue

  • QA

    How to delete a disk from a LVM group while keeping the data

    ByQ A Mar 24, 2018Feb 28, 2020

    This is the scenario: I want to remove a old hard disk which is a LVM PV and contains data. There is free space available on other PVs in the VG. It should move the data from the disk to be removed to other PVs and then remove the disk. The process to remove sdb…

    Read More How to delete a disk from a LVM group while keeping the dataContinue

  • QA

    Quick method to sniff the data left on a Linux VM in the public cloud

    ByQ A Mar 24, 2018

    VM disks in public cloud may be shared by customers. This is privacy problem. Is there a quick method to sniff the data left on a Linux VM? One possible method: # dd if=/dev/xvda bs=1M | strings -n 100 > strings.txt Using the dd and strings which are pervasive on Linux systems.

    Read More Quick method to sniff the data left on a Linux VM in the public cloudContinue

  • QA

    Xen HVM DomU configuration file

    ByQ A Mar 24, 2018

    An example of Xen HVM DomU configuration file. An example for install the OS from an ISO: name=”10.0.1.235″ vcpus=2 memory=2048 shadow_memory=8 disk=[‘file:/lhome/xen/vm-10.0.1.235/vmdisk0,xvda,w’, ‘file:/lhome/Linux-x86_64-DVD.iso,xvdc:cdrom,r’] vif=[‘bridge=xenbr0′] kernel=’/usr/lib/xen/boot/hvmloader’ builder=’hvm’ device_model=’/usr/lib64/xen/bin/qemu-dm’ extra=” vnc=1 vnclisten=”0.0.0.0″ vncpasswd=’1234567′ # vncdisplay=1 vncconsole=1 on_reboot=’restart’ on_crash=’restart’ An example for run the VM after installation: name=”10.0.1.235″ vcpus=2 memory=2048 shadow_memory=8 disk=[‘file:/lhome/xen/vm-10.0.1.235/vmdisk0,xvda,w’] vif=[‘bridge=xenbr0′] kernel=’/usr/lib/xen/boot/hvmloader’ builder=’hvm’ device_model=’/usr/lib64/xen/bin/qemu-dm’ extra=” vnc=1…

    Read More Xen HVM DomU configuration fileContinue

  • QA

    How to attach and mount Xen DomU’s disk to Dom0

    ByQ A Mar 24, 2018

    How to attach and mount Xen DomU’s disk to Dom0 To attach phy:vg_xen/vm-10.1.1.228 to xvda on Domain-0: # xm block-attach Domain-0 phy:vg_xen/vm-10.1.1.228 xvda w Mount the new partition /dev/xvda2 to /mnt/xvda2: # mount /dev/xvda2 /mnt/xvda2 After finishing using the partition, umount it and detach it: # umount /mnt/xvda2/ # xm block-detach Domain-0 xvda

    Read More How to attach and mount Xen DomU’s disk to Dom0Continue

  • QA

    top-like tools on Linux for network

    ByQ A Mar 24, 2018

    How to display the network usage by processes like top for CPU/mem on Linux? The nethogs tool is my favorite: nethogs – Net top tool grouping bandwidth per process

    Read More top-like tools on Linux for networkContinue

  • QA

    Auto indenting for OCaml code in Vim

    ByQ A Mar 24, 2018

    How to set up auto indenting for OCaml code in Vim? The built-in indenting in Vim for OCaml seems not very good. Please check the post at https://www.systutorials.com/5212/auto-indenting-for-ocaml-code-in-vim-with-ocp-indent/

    Read More Auto indenting for OCaml code in VimContinue

  • QA

    How to get the output of a system command in C

    ByQ A Mar 24, 2018

    How to get the output of a system command in C? The system function is handy. But how to get the output? popen is a useful function for this purpose: https://www.systutorials.com/docs/linux/man/3p-popen/ You can use normal file operation functions like fgets to read file content from the file opened by popen.

    Read More How to get the output of a system command in CContinue

  • QA

    How to find the disk space left for a file on Linux

    ByQ A Mar 24, 2018

    How to find the disk space left for a file on Linux? For example, a program may append data to a file: /mnt/logs/app-log.log How to find which partition the app-log.log is on and how much disk space left on that partition? Use this command: $ df -B1 /mnt/logs/app-log.log | tail -1 | cut -d’ ‘…

    Read More How to find the disk space left for a file on LinuxContinue

  • QA

    How to padding a integer with 0s in bash?

    ByQ A Mar 24, 2018

    How to convert an integer into a string of many characters padded with 0s in bash. To do this in C: sprintf(buffer, “%08d”, n); which convert integer n to a 8-character string padded with leading 0s. How to padding a integer with 0s in bash? In bash, you can also use printf For the previous…

    Read More How to padding a integer with 0s in bash?Continue

  • QA

    How to convert HTML file to text on Linux

    ByQ A Mar 24, 2018

    How to convert HTML file to a text on Linux? You can use html2text (can be installed on Fedora by yum install html2text): $ html2text ${html_file} ${html_file} is the html file to be converted. The converted text will be printed to the STDOUT. You can redirect it to a file if it is needed. Adding…

    Read More How to convert HTML file to text on LinuxContinue

  • QA

    How to convert a latex file to a single page html

    ByEric Ma Mar 24, 2018Mar 24, 2018

    How to convert a latex file to a single page html? htlatex is a good choice. On Fedora, install it by yum install texlive-tex4ht. To generate the HTML page from a latex file doc.tex: htlatex doc You can use the latex2html (can be installed on Fedora by yum install latex2html). $ latex2html -split +0 -info…

    Read More How to convert a latex file to a single page htmlContinue

Page navigation

Previous PagePrevious 1 … 40 41 42 43 44 … 70 Next PageNext

© 2026 SysTutorials

  • Tutorials
  • Linux
  • Linux Manuals
  • Systems
  • Programming
  • Software
  • Subscribe
  • Search