Hot answers tagged

4

I'm not a Linux guru, but I'm going to guess that you have to move MillionDollars to John first before you delete Cancer. mv /home/John/Cancer/MillionDollars /home/John/MillionDollars rm -r /home/John/Cancer/


2

Google says cron would be best for this, but I don't want it to be recurring. Forget about PRTG for anything but monitoring and notifications. It's true - cron jobs are recurring. However, all you need to do is write a simple wrapper script that gets run by cron at the top of each hour - this script would: Check if your program is running. If it is, ...


2

You need to set the PATH at the beginning of the script or use the full path to protractor. cron uses a default PATH while yours is likely modified by some rc file.


2

I can suggest to put the go (and the exec ?) in backgroung with (go build ; exec ./webservice )& You will not be informed if there is a problem in your go program by git, so you will need a log Maybe a better solution will be to automatically kill the go program if it is too long with timeout.


2

Use echo to inspect the $CHECK_SYSTEM string returned by your command, it is not what you think it is. You will need to further process it to remove some whitespace. You may find the virt-what command more useful if it is installed on the system e.g. # virt-what vmware or # virt-what kvm virt-what is a shell script so you can easily add a copy to ...


2

As fruglemonkey said 1 sec is a bad choice. Try at least 5 sec mean. It will help to have more consistent graph. Of course you can show both data ;-) I can't see anything wrong on your math. But I suggest you to track number of packet/s too. This metric is a lot of important to understand problems. Is not rare you have pps limit reached with low traffic on ...


2

if you cant cat raw device it looks like whole thing is not responding... but if you somehow manage to make it work: first and most important, dump whole usb stick to file, using ddrescue if neccesary, in case shit hits the fan Then use either testdisk or gpart to recover partition table, those programs guesses start of partiton based on filesystem headers ...


1

Is this what you are trying to do? echo -n "Enter the source widget name [ENTER]: " read srcWidgetName echo -n "Enter the destination widget name [ENTER]: " read dstWidgetName find . -type f -name "$srcWidgetName*" | while read -r file; do mv "$file" "${file//$srcWidgetName/$dstWidgetName}" done


1

dpkg-reconfigure exim4 is just an interface to easily create the text configuration files for exim. There is no advantage to finding a way to answer the questions automatically (if you did have to do that, expect would be a valid choice). If you have a lot of servers you should provide or generate the files in /etc/exim directly. You could, for example, do ...


1

Don't use dialogs, if it's just for dpkg. Have a look at: debconf-set-selections DEBIAN_FRONTEND http://www.microhowto.info/howto/perform_an_unattended_installation_of_a_debian_package.html


1

@Iain is correct that this script is likely not doing what you need, however in general if you're looking to compare strings you're missing an equalsign, this would probably work better: if [ "$CHECK_SYSTEM" == "Product Name: VMware Virtual Platform" ] ; then See this excellent thread for more: ...


1

The order will be in lexicographic order (alphabetical order). It will be exactly the same as what you see if you type ls directory/* at a Bash shell prompt. If you want to sort by modification time, you can use ls -t. See man ls for other sorting options.


1

directory/* is expanded by the shell first (normally bash). Running echo directory/* will echo all matching files, and bash will sort these matching elements lexicographically first, before passing them as arguments to echo, which then prints them. In the case of running ls directory/*, the directory/* is first expanded by the shell, and then presented as a ...


1

Firstly, your syntax is incorrect, since the right order should be: ipmitool [options...] <command> Moreover, in the parameter -H ipmi_hostname, the hostname here should be the domain name of IPMI interface IP address. It's quite odd to login via IPMI through its own IP to print out its IP(!), so I assume that you want to login via server's ...


1

I found the answer after some trial and error: ssh www-data@$BOX "tail -n 1 /server/musicgraph/prod/logs/dao.log | awk -F\$'\\t' '{print \$1}'"



Only top voted, non community-wiki answers of a minimum length are eligible