I tried tar with xvfz and -xvfc both didn’t work in Cygwin on Windows. Here cmd tar with ‘-‘ Question : 1 . How does tar works with – or without _ ? Please suggest to execute tar -xvfz sshpass-1.0.5.tar.gz. Answer tar has 3 types of syntax (according to this ): long options (–fil…
Error while loading shared libraries: libboost_iostreams.so.1.59.0: cannot open shared object file: No such file or directory
I am running a C++ executable on ubuntu. The executable links into some boost libraries. This is the output when I attempt to run the binary: What should be the future coarse of action i should take to remove this error. Answer Let’s assume your library is being exist but not in standard paths and you&#…
Linux Framebuffer set resolution correctly
I have a RaspberryPi and want to display an image fullscreen without xserver – so write it directly to the framebuffer. No problem here. But setting it fullscreen doesn’t work. yields: So I use resulting in If I now use fbi to display an image, or just fill the framebuffer /dev/urandom >> /d…
Get the PID of a process started with sudo via ssh
I need the process id of a process (here sleep 20) started remotely via SSH and sudo. date is inserted to illustrate the duration of the SSH connection. Without connection there is also no process on my remote machine, of course. On a second machine the last, complete command works fine: Any suggestion why th…
Python how to pass in an optional filename parameter when running a script to process a file
I have a python script that processes an XML file each day (it is transferred via SFTP to a remote directory, then temporarily copied to a local directory) and stores its information in a MySQL database. One of my parameters for the file is set to “date=today” so that the correct file is processed…
Protect website files on linux hosting server
l have a website that is hosted in linux server, and my root is (/home/MyAccountName). My website allows users to upload there c++/c code, compile, and execute it. The problem is: The executed user’s program will have all the owner permissions (read – write -execute). so if the user’s code i…
Sed command in linux
How do I extract URL’s from a file? My file name is URL_name.txt This file has a lot of url inside. It looks like this: Here is my idea, I want to remove everything before URLs then I can remove everything after URL. How do I use sed command deal with it? The output should be http://www.google.com/ http…
check if a file is jpeg format using shell script
I know I can use file pic.jpg to get the file type, but how do I write an if statement to check it in a shell script? E.g. (pseudo code): Answer Try (assumes Bash v3.0+, using =~, the regex-matching operator): If you want to match file’s output more closely: This will only match if the output starts wit…
compile error in VeridisBiometricSDK_5.0_Linux sample: MatchingExample
I try to use VeridisBiometricSDK_5.0_Linux which is free Biometric library which has samples I tired to compile MatchingExample by doing exactly what the Readme file said : make MatchingExample.cpp but I have this error result: To compile use: make For example: make AsyncCaptureExample The output will be gene…
How can I check (and delete) if the last line (that contains the last occurence of a string) has a comma as last character?
I’ve been looking all over the internet but had no result. I’m trying to build a package generator (in shell/bash) and that respective package contains (one or more) json files. When browsing through a json file, if the user wants to delete one of the steps I must first take into consideration wha…