Skip to content

SysTutorials

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

  • Tutorial

    How to cat a single file’s content from a tar without unpacking it on Linux?

    ByDavid Yang Mar 24, 2018Aug 9, 2020

    How to cat a single file’s content from a tar without unpacking it on Linux? For example, I know there is a file README.txt in a tar tools.tar.gz . How to cat the content of README.txt out? You can do this by using a combination of tar‘s options and arguments. -O, –to-stdout Extract files to…

    Read More How to cat a single file’s content from a tar without unpacking it on Linux?Continue

  • QA | Tutorial

    How to test whether a given path is a directory or a file in C++?

    ByEric Ma Mar 24, 2018Oct 9, 2020

    How to test whether a given path is a directory or a file in C++? For example, pathtype(“/”) –> “a dir” pathtype(“/tmp/file.txt”) –> “a file” # if there is a file file.txt pathtype(“/tmp/dir.txt”) –> “a dir” # if there is a dir named dir.txt The type of a file/dir can be found out using lstat()…

    Read More How to test whether a given path is a directory or a file in C++?Continue

  • QA

    How to change the default target of `make`?

    ByEric Ma Mar 24, 2018Nov 21, 2019

    The default target of make is the first target. But can I change the default target in Makefile and how to change the default target of make? The default goal of make is the first target whose name does not start with ‘.’ if .DEFAULT_GOAL is not set. Ref: make manual. To set the default…

    Read More How to change the default target of `make`?Continue

  • QA

    How to get one process’s port number?

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    If we want to check one program on one remote server, we need to know this server’s IP and port number. How to get this program’s port number in the remote server? # netstat -tulpn Remember to run this program with root permission since some programs can only be accessed by root.

    Read More How to get one process’s port number?Continue

  • QA

    how to list and delete shared memory in linux?

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    how to list and delete shared memory in linux? List all shared memories in your Linux Systems > $ ipcs -m Delete specific one > $ ipcrm -M 0x0001869c

    Read More how to list and delete shared memory in linux?Continue

  • QA

    What are the differences between BIOS and UEFI?

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    BIOS: Basic Input Output Systems UEFI: Unified Extensible Firmware Interface UEFI is the advanced BIOS, which solves some limitations in BIOS such as 1, 16-bit processor mode; 2, 1 MB addressable space and PC AT hardware. References: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface

    Read More What are the differences between BIOS and UEFI?Continue

  • QA

    Latex is stuck with a strange problem, see more information for details.

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    $ make pdflatex main.tex This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex) restricted write18 enabled. entering extended mode (./main.tex LaTeX2e <2016/02/01> Babel <3.9q> and hyphenation patterns for 81 language(s) loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (./usenix.sty (/usr/share/texlive/texmf-dist/tex/latex/psnfss/mathptmx.sty)) (/usr/share/texlive/texmf-dist/tex/latex/graphics/epsfig.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty) (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg) (/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))))) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)…

    Read More Latex is stuck with a strange problem, see more information for details.Continue

  • QA

    What are the differences between NUMA architecture and SMP architecture?

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    NUMA Architecture: Non-Uniform Memory Access architecture. SMP: Symmetric Multiprocessing architecture. In a Symmetric Multiprocessor, the architectural “distance” to any memory location is the same for all processors, i.e. “symmetric”. In a NonUniform Memory Access machine, each processor is “closer” to some memory locations than others; i.e. memory is partitioned among them Asymmetrically. From my understanding,…

    Read More What are the differences between NUMA architecture and SMP architecture?Continue

  • QA

    How to get a server’s serial number remotely?

    ByWeiwei Jia Mar 24, 2018Mar 30, 2026

    How to get a server’s serial number remotely? Tested on Linux Ubuntu 24.04 LTS Trusty > sudo apt-get install dmidecode > sudo dmidecode -s system-serial-number I tried this on several Linux boxes with Rocky Linux 9 and it seems A physical node returns a string like System Serial Number. A KVM VM returns a string…

    Read More How to get a server’s serial number remotely?Continue

  • QA

    How can I login without password and run command in server at a local machine remotely?

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    Login without PWD is fast and efficient. Running commands in server from local machine also have these benefits. login without PWD: add PC A’s public key to PC B’s authorized keys. > a@A:~> cat .ssh/id_rsa.pub | ssh b@B ‘cat >> .ssh/authorized_keys’ > b@B’s password: Run command remotely ssh root@MachineB “ls” NOTE: running commands remotely is…

    Read More How can I login without password and run command in server at a local machine remotely?Continue

  • QA

    Why do I need to run latex/bibtex three times to make everything look good?

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    Why does latex need to be executed 3 times like following? pdflatex main.tex bibtex main pdflatex main.tex pdflatex main.tex Copied from https://tex.stackexchange.com/questions/53235/why-does-latex-bibtex-need-three-passes-to-clear-up-all-warnings. The reason is as follows: 1, At the first latex run, all cite{…} arguments are written in the file document.aux. 2, At the bibtex run, this information is taken by bibtex and the…

    Read More Why do I need to run latex/bibtex three times to make everything look good?Continue

  • QA

    How to judge whether its STDERR is redirected to a file in a Bash script on Linux?

    ByEric Ma Mar 24, 2018Nov 21, 2019

    Within a Bash script, how to judge whether its STDERR is redirected to a file in Bash on Linux? For example, ./script.sh /tmp/log 2>&1 Can script.sh detect that its STDERR is redirected? Knowing the destination file is better. To test whether a script’s STDERR (or STDOUT) is redirected to a file, check by [[ -f…

    Read More How to judge whether its STDERR is redirected to a file in a Bash script on Linux?Continue

  • QA

    What is the difference between work conserving I/O scheduler and non-work conserving I/O scheduler?

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    What is the difference between work conserving I/O scheduler and non-work conserving I/O scheduler? In a work-conserving mode, the scheduler must choose one of the pending requests, if any, to dispatch, even if the pending requests are far away from the current disk head position. The rationale for non-work-conserving schedulers, such as the anticipatory scheduler…

    Read More What is the difference between work conserving I/O scheduler and non-work conserving I/O scheduler?Continue

  • QA

    how to set linux date and time in commands

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    how to set linux date and time in commands For example, to change date to 14 Nov 2017 11:57:00, the command would be, $ sudo date –set “14 Nov 2017 11:57:00” Tue Nov 14 11:57:00 HKT 2017

    Read More how to set linux date and time in commandsContinue

  • QA

    diff alternative on Windows to find differences between 2 files?

    ByEric Ma Mar 24, 2018Nov 21, 2019

    diff on Linux is a very handy tool. Any good diff alternatives on Windows to find differences between 2 files? A GUI program will be better on Windows. I would recommend meld for Windows users. Meld is a visual diff and merge tool open source software. meld is available on Linux, Windows and Mac OS…

    Read More diff alternative on Windows to find differences between 2 files?Continue

  • Tutorial

    How to split a string by string in Python?

    ByQ A Mar 24, 2018Aug 8, 2020

    How to split a string by string in Python? For example, “a string separated by space” => [“a”, “string”, “separated”, “by”, “space”] and “a,string,separated,by,comma” => [“a”, “string”, “separated”, “by”, “comma”] Python’s string.split() standard library function, if provided a separator, will split the string by the separator, for example >>> str2 = “a,string,separated,by,,,comma” >>> str2.split(“,”) [‘a’,…

    Read More How to split a string by string in Python?Continue

  • QA

    In Python, `os.makedirs()` with 0777 mode does not give others write permission

    ByEric Ma Mar 24, 2018Nov 21, 2019

    In Python, os.makedirs() with 0777 mode can not give others write permission The code is as follows $ python Python 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2 Type “help”, “copyright”, “credits” or “license” for more information. >>> import os >>> os.makedirs(“/tmp/test1/test2”, 0777) >>> The created dirs are not…

    Read More In Python, `os.makedirs()` with 0777 mode does not give others write permissionContinue

  • QA

    How to get the value of a default value if the key does not exist in `dict()` in Python?

    ByDavid Yang Mar 24, 2018Aug 8, 2020

    How to get the value of a default value if the key does not exist in dict() in Python? We can use the get() function to assign default value if the key does not exist in the dict yet. dict.get(key[, default]) Example as follows. msges = {“msg”: “Hello, World!”} msg = msges.get(“msg”, “”) print(msg) #…

    Read More How to get the value of a default value if the key does not exist in `dict()` in Python?Continue

  • QA

    How to autohide top and bottom panel in RHEL 7

    ByEric Ma Mar 24, 2018Oct 9, 2020

    How to autohide top and bottom panels in RHEL 7 while application is running I don’t think GNOME 3 or GNOME 3 classic has this function available or there any plugins that supports so. If you need this function that the panel can hide automatically, you may consider another desktop environment, such as MATE, that…

    Read More How to autohide top and bottom panel in RHEL 7Continue

  • QA

    How to install alien on CentOS 7 to convert .deb to .rpm?

    ByEric Ma Mar 24, 2018Mar 30, 2026

    How to install the alien command on Rocky Linux 9 to convert .deb to .rpm? alien is already in EPEL and it makes it quite easy to install it in Rocky Linux 9. First, enable EPEL following this tutorials. Then, install alien by # yum install alien Then alien should be ready: # yum info…

    Read More How to install alien on CentOS 7 to convert .deb to .rpm?Continue

Page navigation

Previous PagePrevious 1 … 9 10 11 12 13 … 70 Next PageNext

© 2026 SysTutorials

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