Skip to content
Advertisement

Tag: bash

Upstart stop if running

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

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

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

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

Advertisement