I have a Jenkins job to stop a node application, deploy code, and start the application. The start/stop is done with an Upstart script. I use initctl stop node-App If the job is running, this works great. But if the app has died or is in a stopped state, the output is initctl: Unknown instance: This causes the Jenkins job
Tag: bash
How to update memcached server in Linux
I have installed memcahced server in my machine So, I wanted to update it into 1.4.17 since it is the latest one. But, when I say yum update memcached, it yells like this. OS : Ubuntu 12.10 Result for aptitude show memcached command Answer Try running aptitude show memcached in the terminal. Then you might find out that the latest
HBase does not run after ./start-hbase.sh – Permission Denied?
I want to run HBase. I have installed hadoop completely and when I run start-all.sh , it works fine and gives me this output: But when I want to run start-hbase.sh , it gives me some errors of permission denied which I do not understand why: after that, I tried to run sudo ./start-hbase.sh , and I got something more
How do I ‘skip’ minified JavaScript files while searching through a tree of js files?
I search a large js tree frequently for certain Tokens. Consider you were looking for all of the ‘.prototype’ tokens in your js files. I would do something like this: Of coarse this produces a boat-load of hits on minified vendor libs. Obscuring the real results I am after. i.e: results like that Ad nauseam. So how can I detect
What does ‘bash -c’ do?
I followed the following tutorial: http://davidtsadler.com/archives/2012/06/03/how-to-install-magento-on-ubuntu/ At some point it told me to execute the following command: What did this command do, and how I can cancel that? I restarted the computer, and it seems that it is still running. I looked in .bashrc and .profile, but I did not find it inside. Answer Quoting from man bash: -c string
How to find the latest folder in a directory and then make a full path accordingly?
I have a directory which will have some folders and some files within it. Suppose this is my current directory as shown below with pwd command – And I am logged into machineA. This /bat/data/snapshot directory will have some folders and some files within it as shown below – So the two folders I have is 20131222 and 20131215 as
crontab @reboot does not execute bash script when server is rebooted
I’m using @reboot ~/www/example.com/bin/server in my user’s crontab…but when I reboot the server, the web server (this script) does not come up. (script works fine from command line). My guess is the /home/user directory has not been mounted yet…does anyone know if its possible to get a script to run out of a home directory using this crontab @reboot method?
mv: cannot overwrite directory with non-directory
Is it possible to get around this problem? I have a situation where I need to move some files to 1 directory below. problem is that the filename inside g/ directory is the same as the directory name and I receive the following error: Example: /home/user/data/doc/version/3766/297534 is a directory, inside there is a also a file named 297534 so I
Find the sum of an infinite series
How can I find the sum of an infinite series? Series: My misbehaving example: Is it possible to carry out this method correct calculation or how to resolve this problem in other ways? Answer This series does not converge. It’s called the harmonic series and it’s known to do not converge. Moreover, as a comment says, you need to start
bash wildcard n digits
So I’ve got the following files in the tmp directory: if I wanted to list only the files that end in ‘.digits’ (0, 1, 22, 4444) but not (t9) I could try and use wildcards such as this: however I get the following results with the ugly error I’ve also tried using {0..999} but that also results in the same