I am trying to get the following result in the 1.files archived as tar with current date as a part of the tar name. 2.files removed once archived. /usr/sap/ST1/POC/backtest/*.txt has 2 txt files. This works fine as the file name is mentioned as arc_2017-02-28.tar. But when I tried this: The output is an error…
Tag: linux
how to download a sub directory from azure blob storage using blobxfer
I am using ubuntu 64bit 14.04. How can I use blobxfer to download a sub directory from Azure blob storage to my local machine . Say I have a storage account by name MY_STORAGE_ACCOUNT ,container by name MY_CONTAINER and following contents inside container. I want to download the sub directory directory3 only …
Comparing two numbers but if condition does not work correctly
i am new to bash script. I am making a script to calculate cpu usage. So what I am doing is calculating cpu usage and comparing with a predefined value i.e threshold value. But my if condition is always going wrong. Please help me to correct my script. Please do check the above script in bash beacause I have …
pyravendb query parameters parsing error
I’ve noticed a weird parsing problem with ravendb’s python client. when i use this query knowing that url = “http://www.mywebsite.net/” The relevent part of the error stack is the following : BUT if I simply add a simple ‘ ‘ to the url parameter in the query, it works witho…
Linux best practice to start and watch another process
In my process I need to start/restart another process. Currently I use a thread with a tiny stack size and the following code: I feel like that’s not best practice. I have no idea about the resources the std::system() call is blocking or wasting. I’m on an embedded Linux – so in general I tr…
modprobe: ERROR: could not insert ‘tun’: Unknown symbol in module, or unknown parameter (see dmesg)
My server runs openvpn client, it was working fine. But after a server reboot, I couldn’t startup the openvpn client. openvpn log says: but After some searching, I found this command: and the ‘dmesg’ says: I need help, thank you very much. Answer The “No such device” message mean…
Using shared memory and how to correctly unallocate a space with IPC_RMID
I have 2 applications running on my linux box, a server and a client. My server and client examples I am working with is from Dave Marshalls examples. Everything works well, but when I try this in my background process and I want to extend my original segment (perhaps due to an application upgrade in the futu…
Weird recursive directory structure
Somehow, my system (Ubuntu WSL layer on Windows; so treat as exactly Ubuntu) went a bit crazy. For a directory (a git repo if it matters) /path/to/foo, running ls shows the git files ORIG_HEAD, index, and index.lock in there. I tried to debug this by going cd .git, but an ls there showed me my same list of fi…
What would be the disadvantage of creating an array of really big size on 64 bit systems?
Operating systems like Linux work on the principle of Copy-on-write, so even if you are allocating an array of say 100 GB, but only use upto 10GB, you would only be using 10 GB of memory. So, what would be the disadvantage of creating such a big array? I can see an advantage though, which is that you won̵…
Raspberry pi is in a reboot-loop
I wrote this python program for my Raspberry Pi 3: I made an edit in the /etc/rc.local that the program will autostart. The edit is only adding the following line before exit 0: python /home/pi/reboot.py But now my Raspberry pi 3 is in a reboot loop. How can I delete the line I added in /etc/rc.local? Answer …