Search Results

Search found 1984 results on 80 pages for 'exec'.

Page 45/80 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • How to make Microsoft Keyboard special keys run osascript commands on OS X?

    - by t-a-w
    I'm trying to make (1) special key open new terminal window. I bound it to file /Users/taw/bin/new_term, which contains: #!/bin/sh exec osascript -e 'tell application "Terminal" to do script "cd ."' This does the trick, except it also opens a Terminal window with this (even though Terminal.app is configured to always close windows when processes finish): Last login: Thu Mar 11 19:41:29 on ttys000 /Users/taw/bin/new_term ; exit; ~$ /Users/taw/bin/new_term ; exit; tab 1 logout [Process completed] How do I make it all work correctly? (possibly using a way different that what I've been attempting so far)

    Read the article

  • correct format for datetime appended to filename

    - by jhayes
    I'm trying to setup a batch file to execute a set of stored procs and dump the output to a timestamped text file. I'm having problems finding the correct format for the timestamp. Here is what I'm using osql.exe -S <server> -E -Q "EXEC <stored procedure> " -o "c:\filename_%date:~-0,10%_%time:~-0,10%.txt" The error I get is: Cannot open output file - x:\filename_Thu 06/25/_16:26:43.1.txt No such file or directory I can't find the documentation and I've played around with it but can't find the correct format.

    Read the article

  • When I auto-start Supervisord on boot, the [program:start_gunicorn] don't start

    - by Charlesliam
    The [program:start_gunicorn] is running with no error when I manually start supervisord with this setup. [program:start_gunicorn] command=/env/nafd/bin/gunicorn_start priority=1 autostart=true autorestart=unexpected user=nafd_it redirect_stderr=true stdout_logfile=/env/nafd/logs/gunicorn_supervisor.log stderr_logfile=/env/nafd/logs/gunicorn_supervisor_err.log I successfully run this init script for my supervisord. But when I used auto-start init script for supervisord the gunicorn is not running. ]# service gunicorn status gunicorn: unrecognized service What do I need to do to make the [program:start_gunicorn] run when using auto-start supervisord on boot? Here's my gunicorn config. /env/nafd/bin/gunicorn_start #!/bin/bash NAME="nafd_proj" DJANGODIR=/env/nafd/nafd_proj SOCKFILE=/env/nafd/run/gunicorn.sock NUM_WORKERS=1 DJANGO_SETTINGS_MODULE=nafd_proj.settings DJANGO_WSGI_MODULE=nafd_proj.wsgi echo "Starting $NAME as 'NAFD Web Server'" source /env/nafd/bin/activate export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE export PYTHONPATH=$DJANGODIR:$PYTHONPATH RUNDIR=$(dirname $SOCKFILE) test -d $RUNDIR || mkdir -p $RUNDIR cd /env/nafd/nafd_proj exec ../bin/gunicorn ${DJANGO_WSGI_MODULE}:application --bind=127.0.0.1:8001 \ --name $NAME \ --workers $NUM_WORKERS \ --log-level=debug \` Any idea is really appreciated.

    Read the article

  • How to call a program and exit from the shell (the caller) when program is active?

    - by Jack
    I want to run a program with GUI, by typing into konsole: foo args … and exit from the shell (that's the caller) when the program (foo) is active. How do I this? Is there a Linux/Unix built-in command/program to do it? I'm not a shell-man, really. I know that it's possible by writing a small program in C or C++ (any other programming language with small I/O interface on POSIX) programming language with the fork() and one-of exec*() function family. It may take some time; I'll do it only if there is no native solution. Sorry for my bad English; it's not my native language. Also, not sure on tags, please edit for me, if I'm wrong. If it matters, I'm using OpenSUSE 10.x.

    Read the article

  • Installing GPSBabel on CentOS 5 x86_64

    - by Clint Chaney
    Well first let me say I have no clue about doing anything on my server, I ask my host to do all installs for me. I run a website where users store latitude and longitude coordinates in my database. I would like them to be able to download these waypoints to their gps units. I found a program called GPSBabel that allows this to be done. http://www.gpsbabel.org/ I want to be able to control GPSBabel from PHP using exec() or something along those lines. The problem is that the linux version of the program is a source file and they don't want to build or install it without some source of instructions. Does anyone have experience with installing this? Perhaps know someone that has and that can lead me in the right direction? Any help would be hugely appreciated. I'm pretty much stuck without getting this to work.

    Read the article

  • Exchange Activesync policy - can I make it not required for a user?

    - by TheCleaner
    Exchange 2010 sp2. I have a "C" level exec that wants to get his email on his android tablet. Easy enough. However, he doesn't want any Activesync policy applied to his device for remote wipe, etc. not even the default policy, and doesn't want to use OWA. I thought I knew Exchange pretty well, but can't find a Powershell command or anything that will allow a device to connect without enforcing at least some kind of policy. Is he out of luck using Activesync? I can set him up with POP3/IMAP, but would rather not.

    Read the article

  • Mutt: apply command to all tagged messages

    - by mrucci
    From the mutt manual: Once you have tagged the desired messages, you can use the tag-prefix operator, which is the ; (semicolon) key by default. When the tag-prefix operator is used, the next operation will be applied to all tagged messages if that operation can be used in that manner. But it seems that I can only execute commands that are already bound to a specific keyboard shortcut. For example I can use ;d to delete all selected messages. What if I want to apply an "unbound" command (such as purge-message)? I have also tried using something based on :exec tag-prefix or :push tag-prefix without success.

    Read the article

  • Taking two actions in monit

    - by Oddthinking
    My monit script works to detect an outage with a process and inform me when the rule is: IF DOES NOT EXIST THEN ALERT My monit script works to detect an outage and automatically fix it when the rule is: IF DOES NOT EXIST THEN START But, what I want it to do is inform me AND fix it. Two rules in a row seems to make it ignore all but the last: IF DOES NOT EXIST THEN ALERT IF DOES NOT EXIST THEN START # No alert given. I could use a custom script that does both, and IF DOES NOT EXIST THEN EXEC "my_handwritten_script" but I was trying to move away from a mess of hand-written scripts towards a clean Monit configuration. Can I configure Monit to take two actions?

    Read the article

  • How to failover to local account on a cisco switch/router if radius server fails?

    - by 3d1l
    I have the following configuration on a switch that I testing for RADIUS authentication: aaa new-model aaa authenticaton login default group radius local aaa authentication enable default group radius enable aaa authorization exec default group radius local enable secret 5 XXXXXXXXX ! username admin secret 5 XXXXXXXXX ! ip radius source-interface FastEthernet0/1 radius-server host XXX.XXX.XXX.XXX auth-port 1812 acct-port 1813 key XXXXXXXXX radius-server retransmit 3 ! line con 0 line vty 5 15 Radius authentication is working just fine but if the server is not available I can not log into the router with the ADMIN account. What's wrong there? Thanks!

    Read the article

  • searchd under runit continues writing to the runit's log

    - by Eugene
    searchd (Sphinx) run file: #!/bin/sh set -e APP_PATH=/srv/application TARGET_USER=user exec chpst -u $TARGET_USER /usr/bin/searchd --pidfile --nodetach --config $APP_PATH/current/config/production.sphinx.conf tail /var/log/sphinx/current 2014-06-07_18:13:56.87885 precached 9 indexes in 0.497 sec 2014-06-07_18:13:57.13740 precached 9 indexes in 0.497 sec 2014-06-07_18:13:57.88113 precached 9 indexes in 0.497 sec 2014-06-07_18:13:57.89167 precached 9 indexes in 0.497 sec 2014-06-07_18:13:59.75555 precached 9 indexes in 0.497 sec 2014-06-07_18:13:59.81554 precached 9 indexes in 0.497 sec 2014-06-07_18:14:00.33466 precached 9 indexes in 0.497 sec ... it continues to write the same line until sv stop sphinx ... Everything works fine, seachd starts and responds to the queries. But how to make logs to be less repetitive? When I start Sphinx manually it prints the "precached 9 indexes" just once.

    Read the article

  • Tar and gzip together, but the other way round?

    - by Boldewyn
    Gzipping a tar file as whole is drop dead easy and even implemented as option inside tar. So far, so good. However, from an archiver's point of view, it would be better to tar the gzipped single files. (The rationale behind it is, that data loss is minified, if there is a single corrupt gzipped file, than if your whole tarball is corrupted due to gzip or copy errors.) Has anyone experience with this? Are there drawbacks? Are there more solid/tested solutions for this than find folder -exec gzip '{}' \; tar cf folder.tar folder

    Read the article

  • How can I copy files to an external drive and verify their integrity in OS X?

    - by jedavis
    I'm moving large amounts of data from one external drive to another larger one. The files are important and the smaller drives need to be cleared and reused (HD camera). Is there some utility for moving files and verifying their integrity? I've been using this command find . -type f -exec md5 '{}' \; > md5list.txt in the terminal to create a list of MD5s for each file then using diff to compare the two. However, I am moving 320GB at a time, which takes a while by itself. Computing the checksums takes another hour or so. It would be much more efficient to do this on the fly, during the copy. I'm just hoping someone has already written the software...

    Read the article

  • Drobo Pro or SAN for backups

    - by PHLiGHT
    I have multiple offices and was thinking of using two Drobo Pros as a storage location for my backups, with one at each site being synced. It seems like on the surface its a cheap alternative to a SAN. Because it will just be used for storing backups I don't think that performance is as big of an issue. Related question. How do you sync your backups from your main location to a remote site. I am using Backup Exec and wondered if I should use a feature in the program or use something like Delta Copy.

    Read the article

  • how to get bash prompt on login

    - by user419534
    When I connect to remote machine uisng ssh, by default it is not on bash prompt. To get bash prompt by default on login I did as below by create .cshrc file in my home directory if ($?prompt) then setenv SHELL /bin/bash exec $SHELL -login endif It works well and I am getting bash shell but I have another file as .bashrc in my home directory which gets executed when i run bash explicitly and I have done lot of customization in this file as per my requirement. Is it possible to get my .bashrc executed somehow from .cshrc or some other way? For example I need to go connect to host B from host A, I do this From A - ssh B this brings host B but not with bash prompt. To get bash prompt I created .cshrc as mentioned above but my above code snippet does not call my .bashrc script.

    Read the article

  • LDAP loginShell on platforms with different paths

    - by neoice
    I'm using LDAP to deal with users and authentication across my network. I'm now adding FreeBSD hosts and have hit a problem with login shells. on Linux, shells tend to be in /bin/$shellname, so setting my login shell in LDAP to /bin/zsh works perfectly. on FreeBSD, /bin/zsh doesnt exist, I need to use /usr/local/bin/zsh. is there a solution to this? I imagine I might be able to make some sort of login-shell.sh script that LDAP passes out as the "shell" and then use the script to determine the actual shell for the user, but I'm not a fan of that idea. I'm using Debian and FreeBSD, both with a standard OpenLDAP/PAM/nss setup. edit: it looks like using /bin/sh and adding an exec $shell to .profile would "work", but that doesnt scale very well.

    Read the article

  • How do I debug an upstart job?

    - by Cerales
    I have the following job in /etc/init/collector: start on runlevel [2345] stop on runlevel [!2345] expect daemon exec /usr/bin/twistd -y /path/to/my/tac/file When I start the job with sudo service collector start, it hangs. If I ctrl-c and run initctl list, I see this: collector start/killed, process 616 I can't see an instance of the twistd daemon in ps, and the HTTP server it's supposed to be providing does not exist. I even tried this without 'expect daemon' and with a simple call to a one-line bash script using a script stanza, and it still doesn't work. I think I'm doing something very wrong. What could it be?

    Read the article

  • Find command exclude files whose path match a certain pattern

    - by user40570
    I have a find command that looks for files that was modified recently and outputs the date find /path/on/server -mtime -1 -name '*.js' -exec ls -l {} \; I would like it to exclude any deeply nested folder that matches a certain pattern e.g. there are a number of folders that have a "statistics" directory and ".svn" directories. So i'd like to be able to say if the file that was modified yesterday is in a folder named statistics ignore it. Or perhaps not search for files in those folders at all.

    Read the article

  • Tar an gzip together, but the other way round?

    - by Boldewyn
    Gzipping a tar file as whole is drop dead easy and even implemented as option inside tar. So far, so good. However, from an archiver's point of view, it would be better to tar the gzipped single files. (The rationale behind it is, that data loss is minified, if there is a single corrupt gzipped file, than if your whole tarball is corrupted due to gzip or copy errors.) Has anyone experience with this? Are there drawbacks? Are there more solid/tested solutions for this than find folder -exec gzip '{}' \; tar cf folder.tar folder

    Read the article

  • Mac OS X: How to change the color label of files from the Terminal

    - by Svish
    Is there a way I can set the color label of a file to some color when in the Terminal? I know that the following command lists some info about what the color currently is, but I can't figure out how to do something about it. Like change it. mdls -name kMDItemFSLabel somefile.ext The reason I would like to know is that I want to recursively mark all files in a folder of a certain type with a certain color label (in my case gray). I know how to do the finding: find . -name "*.ext" And I know how I can run the command afterwards for each file using -exec, but I need to know how to do the actual labeling... I would like a solution that only involves commands built-in to Mac OS X. So preferably no 3rd party stuff, unless there is no other way.

    Read the article

  • Automate hashing for each file in a folder?

    - by Kennie R.
    I have quite a few FTP folders, and I add a few each month and prefer to leave some sort of method of verifying their integrity, for example the files MD5SUMS, SHA256SUMS, ... which I could create using a script. Take for example: find ./ -type f -exec md5sum $1 {} \; This works fine, but when I run it each time for each shaxxx sum afterwards, it creates a sum of the MD5SUMs file which is really not wanted. Is there a simpler way, or script, or common way of hashing all the files in to their sums file without causing problems like that? I could really use a better option.

    Read the article

  • RUNIT - created first service directory, "sv start testrun" does not work

    - by Veseliq
    I'm pretty new to runit. I installed it on a Ubuntu host. What I did: 1) created a dir testrun in /etc/sv 2) created a script run in /etc/sv/testrun/run, the script content: #! /bin/bash exec /root/FP/annotate-output python /root/FP/test.py | logger -t svtest 3) If I call directly /etc/sv/testrun/run it executes successfully 4) I run sv start testrun (or sv run testrun, sv restart testrun), all of them end up with the same error msg: fail: sv: unable to change to service directory: file does not exist Any ideas what am I doing wrong? I'm new to runit and base all my actions on the information found here: http://smarden.org/runit/

    Read the article

  • Puppet, Windows, and UAC

    - by usedTobeaMember
    Is it possible to use Puppet on Windows where UAC is enabled? Does Puppet have any method for automatically saying yes to UAC prompts for a software install? My module does the following workflow: Downloads an MSI file locally from the Puppetmaster Creates a local batch file using template function which does cmd.exe /c msifile.msi /i /quiet .... Runs bat file in an Exec. Unfortunately, it fails due to UAC, I am wondering how people are working around UAC in their Windows Puppet environments. The Puppet documentation seems to only talk about Puppet's own executable in regards to UAC.

    Read the article

  • Run a script as root from apache

    - by Lord Loh.
    I would like to update my hosts file and restart dnsmasq from a web interface (php/apache2). I tried playing around with suid bits (the demonstaration). I have both apache and dnsmasq running on an EC2 instance. I understand that Linux ignores the setuid bit on text scripts, but works on binary files. (Have I got something wrong?). I added exec("whoami"); to the example C program in Wikipedia. Although the effective UID of the C program is 0, whoami does not return root :-( I would thoroughly like to avoid echo password | sudo service dnsmasq restart or adding apache to the sudoers without password! Is there a way out? How does webmin do such things?

    Read the article

  • Problems using "at" with Apache

    - by Alex Padgett
    I'm trying to use a PHP script to create at jobs, but when it comes time to execute the jobs, nothing seems to be happening. I've tried to output any errors to log files, but have had no luck. It seems obvious that it's a permissions issue, because when I set apache to run as my personal user, everything works fine. However, when I exec wget directly from PHP, everything works fine so it seems that apache has the correct permissions to use it. The problem appears to be when using at in conjunction with apache. So I need to find a way to make this work with apache running as its own user. Here is the command I'm using: echo "wget -qO- http://example.com/" | at now + 1 minute 2>&1 Any ideas? EDIT: Apache can create the at jobs, it just seems that when they execute nothing is happening.

    Read the article

  • correct format for datetime appended to filename

    - by jhayes
    I'm trying to setup a batch file to execute a set of stored procs and dump the output to a timestamped text file. I'm having problems finding the correct format for the timestamp. Here is what I'm using osql.exe -S <server> -E -Q "EXEC <stored procedure> " -o "c:\filename_%date:~-0,10%_%time:~-0,10%.txt" The error I get is: Cannot open output file - x:\filename_Thu 06/25/_16:26:43.1.txt No such file or directory I can't find the documentation and I've played around with it but can't find the correct format.

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >