Skip to content

SysTutorials

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

  • QA

    How to detect whether an image is almost blank on Linux?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    How to detect whether a .jpg image is almost blank/black on Linux? Here is a bash function that I used to detect whether an image is black on Linux: function isBlank () { mean=`convert $1 -format “%[mean]” info:` echo “$mean” } It uses ImageMagic to generate formatted image characteristics (the mean). If the mean is…

    Read More How to detect whether an image is almost blank on Linux?Continue

  • QA

    How to add a “status bar” to screen on Linux?

    ByEric Ma Mar 24, 2018Oct 7, 2019

    I noticed that some guys’ screen console has a status bar with tab numbers. That will be very useful for 1) know you are using screen rather than a normal terminal. 2) which tab you are working in. Below is my ~/.screenrc: hardstatus alwayslastline hardstatus string ‘%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]’ It…

    Read More How to add a “status bar” to screen on Linux?Continue

  • QA

    Fixing “Remote Host Identification Has Changed” Error When SSH to a Server

    ByEric Ma Mar 24, 2018Jun 3, 2023

    If you encounter an error message like the one below when attempting to SSH to a server: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has…

    Read More Fixing “Remote Host Identification Has Changed” Error When SSH to a ServerContinue

  • QA

    How to merge multiple jpg images to a pdf on Linux?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    I have multiple jpg images as files like 001.jpg, 002.jpg … How to merge multiple jpg images to a pdf on Linux? convert is your good friend: convert *.jpg output.pdf

    Read More How to merge multiple jpg images to a pdf on Linux?Continue

  • QA

    List Files from a .deb Package in Ubuntu Linux

    ByEric Ma Mar 24, 2018Sep 30, 2021

    How to list all files from a .deb package like rpm -ql on RPM based systems? Use this command dpkg -L pkg_name -L lists files: -L, –listfiles package-name… List files installed to your system from package-name. More on the dpkg command, check dpkg manual.

    Read More List Files from a .deb Package in Ubuntu LinuxContinue

  • QA

    How to check the replication factor of a file in HDFS?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    A related question: how to find the replication factors of files in a HDFS cluster? method 1: You can use the HDFS command line to ls the file. The second column of the output will show the replication factor of the file. For example, $ hdfs dfs -ls /usr/GroupStorage/data1/out.txt -rw-r–r– 3 hadoop zma 11906625598 2014-10-22…

    Read More How to check the replication factor of a file in HDFS?Continue

  • QA

    How to change an running HDFS cluster’s replication factor?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    Now, I have a running HDFS cluster storing lost files. I want to change its default replication factor. How to change it? What will happen after it is changed? For example, I change from 2 to 3. Will HDFS automatically re-replicate the data chunks? First, the replication factor is client decided. Second, the replication factor…

    Read More How to change an running HDFS cluster’s replication factor?Continue

  • QA

    How to download a rtmp stream on Linux?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    How to download a rtmp video stream on Linux? You can use mplayer to dump the rtmp stream like: mplayer -dumpstream rtmp://example.com/path/to/stream.mp4 It will generate ./stream.dump and you can rename it to the file with the extension you need like stream.mp4. The rtmp link usually can be found from the HTML or JavaScript source code…

    Read More How to download a rtmp stream on Linux?Continue

  • QA

    how to remove specific directories recursively

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    How to remove .svn directories under hlfs dir recursively as follows. weiwei@weiwei-HP-Compaq-dx6128-MT-PX478AV:~/workshop1/hlfs > find ./ -name “.svn” ./test/build/.svn ./test/.svn ./output/conf/.svn ./output/lib32/.svn ./patches/.svn ./src/include/.svn ./src/include/api/.svn ./src/snapshot/.svn ./src/snapshot/unittest/build/.svn ./src/snapshot/unittest/.svn ./src/utils/.svn ./src/clean/Mapreducer/build/.svn ./src/clean/Mapreducer/.svn ./src/clean/.svn ./src/clean/unittest/.svn ./src/icache/.svn ./src/icache/unittest/.svn ./src/backend/.svn ./src/storage/.svn ./src/cache/.svn ./src/cache/unittest/.svn ./src/clone/.svn ./src/tools/.svn ./src/tools/unittest/.svn ./src/logger/.svn weiwei@weiwei-HP-Compaq-dx6128-MT-PX478AV:~/workshop1/hlfs > find ./ -name “.svn” | xargs rm -rf

    Read More how to remove specific directories recursivelyContinue

  • QA

    How to install latest version of Calibre?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    How to install latest version of Calibre? The version from my distro (Ubuntu, Linux Mint, Fedora) seem at 1.xx while the latest Calibre is already at 2.x. You may check Caibre website’s instruction: http://calibre-ebook.com/download_linux sudo -v && wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c “import sys; main=lambda:sys.stderr.write(‘Download failedn’); exec(sys.stdin.read()); main()”

    Read More How to install latest version of Calibre?Continue

  • QA

    What is the design of Snapshots in HDFS?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    What is the design of Snapshots in HDFS? This PDF documents the design of snapshot. Jing Zhao and Tsz-Wo Sze from Hortonworks gave a great talk on the design of HDFS snapshots. The slides can be downloaded at here. The development of snapshot is tracked by HDFS-2802.

    Read More What is the design of Snapshots in HDFS?Continue

  • QA

    How to find which package can be installed for a file, like “yum provides”?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    How to find which package can be installed for a file, like “yum provides”? That is, the package is not installed yet and I do not know the package for a file that I want. The apt-file tool can do the similar things as yum provides. You may need to install it first by sudo…

    Read More How to find which package can be installed for a file, like “yum provides”?Continue

  • QA

    How to balance DataNode storage in HDFS?

    ByEric Ma Mar 24, 2018Feb 26, 2019

    As nodes are added and deleted in a Hadoop cluster. Storage usage across DataNodes may be different. Some DataNodes’ disks are almost used up while some others’ are almost empty. How to balance data across DataNodes in HDFS? Hadoop provides the balancer to redistribute the data. Brief introduction to balancer in Hadoop: balancer. The design…

    Read More How to balance DataNode storage in HDFS?Continue

  • QA

    How to install gitbook?

    ByEric Ma Mar 24, 2018Jun 28, 2018

    How to install gitbook on my own Linux box? First, install node.js following https://www.systutorials.com/qa/1268/how-to-install-node-js-on-fedora or How to install node.js on Ubuntu/Linux Mint depending on your distro. Second, install gitbook by npm to /opt/: # cd /opt/ # npm install gitbook Then, the gitbook can be invoked by /opt/node_modules/gitbook/bin/gitbook.js You may need to install the latest…

    Read More How to install gitbook?Continue

  • QA

    How to install node.js on Fedora?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    How to install node.js on Fedora? You may install it by: # yum install nodejs npm

    Read More How to install node.js on Fedora?Continue

  • QA

    How to run gitbook on a headless server (make Calibre run in headless server)?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    When use gitbook to generate ebook, Calibre reports this: RuntimeError: X server required. If you are running on a headless machine, use xvfb After xvfb is installed, it does not work either. How to make gitbook/Calibre work on a headless server? You need to wrap the command ebook-convert with xvfb-run. However, in gitbook (lib/generate/ebook/index.js), ebook-convert…

    Read More How to run gitbook on a headless server (make Calibre run in headless server)?Continue

  • QA

    How to install node.js on Ubuntu/Linux Mint?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    How to install node.js on Ubuntu/Linux Mint? This is how I install node.js on Linux Mint: # aptitude install nodejs nodejs-legacy npm The nodejs-legacy makes sure the command node will invoke node.js.

    Read More How to install node.js on Ubuntu/Linux Mint?Continue

  • QA

    How to find the DataNodes that actually store a file in HDFS?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    A file may be splitted to many chunks and replications stored on many datanodes in HDFS. Now, the question is how to find the DataNodes that actually store a file in HDFS? You may use the dfsadmin -fsck tool from the Hadoop hdfs util. Here is an example: $ hadoop fsck /user/aaa/file.name -files -locations -blocks…

    Read More How to find the DataNodes that actually store a file in HDFS?Continue

  • QA

    How to config network in host (wireless network) for QEMU guest os

    ByWeiwei Jia Mar 24, 2018Jan 7, 2020

    The host os is connected into network by wireless one so how to let its guest os connect network. Take [1] as a reference. I run it successfully with following steps. 1, create /etc/qemu-ifup script and chmod it. 2, start a qemu guest os with command sudo ./qemu/qemu-system-x86_64 -enable-kvm -m 1024 -drive file=marss_dram.qcow2 -vnc 127.0.0.1:0…

    Read More How to config network in host (wireless network) for QEMU guest osContinue

  • QA

    How to increase the number of files allowed to be opened on Linux?

    ByEric Ma Mar 24, 2018Mar 24, 2018

    On my system: $ ulimit -n 1024 Some tools like GATK are aggressive in creating temporary files by creating more than 1000 files under /tmp/. This will cause the program to fail. How to increase the number of files allowed to be opened on Linux? To increase the max number of open files to 10240,…

    Read More How to increase the number of files allowed to be opened on Linux?Continue

Page navigation

Previous PagePrevious 1 … 30 31 32 33 34 … 70 Next PageNext

© 2026 SysTutorials

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