Search Results

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

Page 42/80 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Shutdown in background - PHP

    - by William
    I'm trying to shutdown an Ubuntu machine from PHP and am running into an issue if I want to delay the shutdown. The PHP line I'm using is: exec("sudo shutdown -h +5 &", $output); Where 5 is however many minutes in the future I want to shutdown. My problem is that this won't background and Apache hangs until either the machine is shutdown or someone else cancels the shutdown. shell_exec() has the same result. Is there another way to do this that will return immediately?

    Read the article

  • SQL CLR not properly enabling

    - by dnolan
    We have a SQL server running SQL 2005 Workgroup 64 bit (9.0.4273), on Windows 2003 server 64 bit. We have run sp_configure and reconfigured the server which indicates that the clr is now enabled. exec sp_configure 'clr enabled', '1' go reconfigure go However, when trying to call CREATE ASSEMBLY the server completely dies on us and we have to do a full reboot of the machine. A little more diagnostic information, even though clr enabled is set to 1 and we have rebooted the full server, running the following statement select * from sys.dm_clr_properties returns directory version state locked CLR version with mscoree which is what it says when the CLR is not enabled on another machine. On a correctly enabled machine (after reboot) this function reads directory C:\Windows\Microsoft.NET\Framework64\v2.0.50727\ version v2.0.50727 state CLR is initialized

    Read the article

  • VB6 network errors Windows 2008 run on ESX VMWare

    - by hivedome
    We have an application built in vb6, the executables for the application are run locally on a Windows 2008 Terminal Server the dll's for the application are located on a network share. Intermittently parts of the application crash with inpage errors.. we realise the .dll it references then copy that dll locally to the windows 2008 server and register the application can then run again alternatly we reboot the server and all ok. ideally we do not want the exec's or dll's on local server, they should be located on network share for other Terminal Servers to access. error values we receive are C0000203 C00000C4 I have disabled windows 2008 UAC and DEP.. Has anyone experienced this type of behaviour in 2008?

    Read the article

  • Want to execute an arm compiled executable on adb shell of android

    - by user37977
    I stuck in a problem. I want a chmreader executable file to be used in android application. Now whenever I tried to execute it from adb shell, it gives error "permission denied" Now, whenever I use "su" it just executes the file, but doesn't do anything. And whenever I give the argument as the path of the file to be read, "# su /sdcard/extract_chmLib /sdcard/docs/HArdcore.chm" it shows "su: exec failed for /sdcard/docs/HArdcore.chm Error:Permission denied" where "/sdcard/extract_chmLib" is the executable file and "/sdcard/docs/HArdcore.chm" is the chm file to be read. Can you please help me???

    Read the article

  • Print full path of files and sizes with find in Linux

    - by cat pants
    Here are the specs: Find all files in / modified after the modification time of /tmp/test, exclude /proc and /sys from the search, and print the full path of the file along with human readable size. Here is what I have so far: find / \( -path /proc -o -path /sys \) -prune -o -newer /tmp/test -exec ls -lh {} \; | less The issue is that the full path doesn't get printed. Unfortunately, ls doesn't support printing the full path! And all solutions I have found that show how to print the full path suggest using find. :| Any ideas? Thanks!

    Read the article

  • grub-efi refuses to chainload Windows 8.1

    - by Alexei Averchenko
    I have installed LMDE (with grub in MBR) after I installed Windows 8.1. I then installed the grub-efi package and added the custom Windows options: #!/bin/sh exec tail -n +3 $0 menuentry "Windows" { search --fs-uuid --no-floppy --set=root A89A-7F4C chainloader (${root})/EFI/Boot/bkpbootx64.efi } menuentry "Windows (backup bootloader)" { search --fs-uuid --no-floppy --set=root A89A-7F4C chainloader (${root})/EFI/Microsoft/Boot/bkpbootmgfw.efi } These are basically a leftover from my older Ubuntu setup. However, grub is refusing to load them, complaining about the invalid signature. What do I do now?

    Read the article

  • Puppet won't execute command

    - by tom
    Puppet 0.25.4 on ubuntu point blank refuses to execute the following command: exec {"initiate replica set": command => "echo 'rs.initiate()' | mongo", path => ["/usr/bin","/usr/sbin","/bin"], user => "root", require => Class["mongodb"] } I can execute the command as root myself, so I'm guessing perhaps it's an issue with the shell. Unfortunately upgrading puppet isn't an option (and causes other issues anyway). I've tried specifying explicit paths to the binaries instead of relying on the path parameter, and also changing the command to: "bash -c \"echo 'rs.initiate()' | mongo\"" Still doesn't work. Any ideas? I get an error message saying something like "failed to change from notrun to 0"

    Read the article

  • Bash delete file when variable = x

    - by twigg
    I'm creating a bash script which reboots the system at each reboot it adds a new line to a text file, I then read the text file before each reboot. Once the variable holding the number of lines reaches say 10 I want the script to delete the text file (at which point on the next reboot it will see the file isn't there, brake the loop and promote the user to start again). I tried this: exec < text.txt nol=0 while read line do nol=`expr $nol + 1` done reboot_count=10 if ["$nol" == "$reboot_count"]; then rm text.txt fi but this doesn't seem to be working, all help is appreciated :)

    Read the article

  • How to run sed on over 10 million files in a directory?

    - by Sandro
    I have a directory that has 10144911 files in it. So far I've tried the following: for f in ls; do sed -i -e 's/blah/blee/g' $f; done Crashed my shell, the ls is in a tilda but i can't figure out how to make one. ls | xargs -0 sed -i -e 's/blah/blee/g' Too many args for sed find . -name "*.txt" -exec sed -i -e 's/blah/blee/g' {} \; Couldn't fork any more no more memory Any other ideas on how to create this kind command? The files don't need to communicate with each other. ls | wc -l seems to work (very slow) so it must be possible.

    Read the article

  • How to run a shell script before restarting a service in Monit in case of a crash

    - by Supratik
    I am using Monit 5.3.2 in my Linux box. I am monitoring some services using Monit. I want to run a script before the running the restart command. I have used the below conditions for the same. if does not exist for 2 times within 3 cycles then exec "/bin/bash -c 'touch /tmp/somefile'" as uid someuser and gid someuser if does not exist for 10 cycles then restart Unfortunately only the restart action is getting executed. Can anyone please help me to identify why the first rule is not executed ? Is there are any other way to solve the problem ?

    Read the article

  • run or send a command to a tmux pane in a running tmux session

    - by cjroebuck
    I want to write a shell script which will attach to a named tmux session, select a window (or pane) in that session and run a command in that selected window (or pane). How do I do this from a bash script? I know tmux new-window -n:mywindow 'exec something' allows you to send commands to a freshly created window. But I need something like tmux select-window -t:0 'my command' I suppose I could use send-keys but seems like their should be something that takes a command or list of commands that get run.

    Read the article

  • sqlcmd backup script failing

    - by Bryan
    I'm trying to use a simple batch script to backup a local instance of SQL Express 2012, as follows: @echo off SET BACKUP_DIR=E:\BackupData SET SERVER=.\\sqlexpress set dom=%date:~0,2% set month=%date:~3,2% set year=%date:~6,4% set file=%year%-%month%-%dom% sqlcmd -S %SERVER% -d master -Q "exec sp_msforeachdb 'BACKUP DATABASE [?] TO DISK=''%BACKUP_DIR%\?.Full.%file%.bak''' The script is failing to run with the following error: Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Client unable to establish connection due to prelogin failure. This is on Server 2008 R2, my SQL database (on localhost) instance is named SQLEXPRESS. There is an instance of SQL Express 2008 on the system (hence client 10.0). The database is configured to use a trusted connection, and the .net desktop software deployed on our network PCs is able to access the database without any problem. Am I missing something obvious here, I've done a fair amount of searching for this error message, and haven't found anything that has been particularly useful so far.

    Read the article

  • Multiple gcc on Mac OS X

    - by snihalani
    I did a port install for gcc version 4.7.1 (MacPorts gcc47 4.7.1_2) I named the executable as g+ and placed it in one my $PATH. I use gcc 4.7.1 when I need c++11 standard. I haven't changed the original g++ so as not messup XCode. I am using eclipse-cdt and running the make all from the window. It's giving me: 20:12:40 **** Build of configuration Default for project 2804-hw2 **** make all g+ -c -Wall -std=c++11 main.cpp -o main.o make: g+: No such file or directory make: *** [main.o] Error 1 20:12:40 Build Finished (took 89ms) Here is my makefile CC=g+ CFLAGS=-c -Wall -std=c++11 LDFLAGS= SOURCES=main.cpp Vector3D.cpp OBJECTS=$(SOURCES:.cpp=.o) EXECUTABLE=exec all: $(SOURCES) $(EXECUTABLE) $(EXECUTABLE): $(OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) -o $@ .cpp.o: $(CC) $(CFLAGS) $< -o $@ clean: rm $(EXECUTABLE) $(OBJECTS) How do I make eclipse detect my g+?

    Read the article

  • execute a command in all subdirectories bash

    - by Luigi R. Viggiano
    I have a directory structure composed by: iTunes/Music/${author}/${album}/${song.mp3} I implemented a script to strip my mp3 bitrate to 128 kbps using lame (which works on a single file at time). My script looks like this 'normalize_mp3.sh': #!/bin/bash SAVEIFS=$IFS IFS=$(echo -en "\n\b") for f in *.mp3 do lame --cbr $f __out.mp3 mv __out.mp3 $f done IFS=$SAVEIFS This works fine, if I go folder by folder and execute this command. But I'd like to have a "global" command, like in 4DOS so I can run: $ cd iTunes/Music $ global normalize_mp3.sh and the global command would traverse all subdirs and execute the normalize_mp3.sh to strip all my mp3 in all subfolders. Anyone knows if there is a unix equivalent to the 4dos global command? I tried to play with find -exec but I just managed to get an headache.

    Read the article

  • In Puppet, how would I secure a password variable (in this case a MySQL password)?

    - by Beaming Mel-Bin
    I am using Puppet to provision MySQL with a parameterised class: class mysql::server( $password ) { package { 'mysql-server': ensure => installed } package { 'mysql': ensure => installed } service { 'mysqld': enable => true, ensure => running, require => Package['mysql-server'], } exec { 'set-mysql-password': unless => "mysqladmin -uroot -p$password status", path => ['/bin', '/usr/bin'], command => "mysqladmin -uroot password $password", require => Service['mysqld'], } } How can I protect $password? Currently, I removed the default world readable permission from the node definition file and explicitly gave puppet read permission via ACL. I'm assuming others have come across a similar situation so perhaps there's a better practice.

    Read the article

  • Login without running bash_profile or bashrc

    - by Tom Ritter
    So let's say one typoed something in their .bashrc that prevents him (or her) from logging in via ssh (i.e. the ssh login exits because of the error in the file). Is there any way that person could login without executing it (or .bashrc since the one runs the other), or otherwise delete/rename/invalidate the file? Suppose you don't have physical access to the machine, and this is the only user account with the ability to ssh in. For Reference: .bash_profile includes .bashrc: [[ -f ~/.bashrc ]] && . ~/.bashrc Edit: Things I have tried: ssh user@host "rm ~/.bashrc" scp nothing user@host:/RAID/home/tom/.bashrc ssh user@host "/bin/bash --norc" All give the error: /RAID/home/tom/.bashrc: line 16: /usr/local/bin/file: No such file or directory /RAID/home/tom/.bashrc: line 16: exec: /usr/local/bin/file: cannot execute: No such file or directory

    Read the article

  • Which hosting will let me execute my own EXE with PHP?

    - by guitar-
    I have a task that PHP (or any server-side scripting language) isn't practical for. It involves a lot of file I/O, processing, etc. and it will execute a lot faster using the program I made in C instead of PHP. Do any hosts allow you to upload your own EXE files and run them on the server using PHP's exec, shell_exec, etc. functions? Do you need a dedicated server to do this? Also, I don't know if Facebook's PHP HipHop is out yet, but I really don't want to use that.

    Read the article

  • Securely wiping a file on a tmpfs

    - by Nanzikambe
    I have a script that decrypts some data to a tmpfs, the directory is secure (permissions), the machine's swap is encrypted (random key on boot) and when the script is done it does a 35 pass wipe (Peter Gutmann) of the cleartext on the tmpfs . I do this because I'm aware wiping files on a journaling file system is insecure, data may be recovered. For discussion, here're the relevant bits extracted: # make the tmpfs mkdir /mnt/tmpfs chmod 0700 /mnt/tmpfs mount -t tmpfs -o size=1M tmpfs /mnt/tmpfs cd /mnt/tmpfs # decrypt the data gpg -o - <crypted_input_file> | \ tar -xjpf - # do processing stuff # wipe contents find . -type f -exec bcwipe -I {} ';' # nuke the tmpfs cd .. umount -f /mnt/tmpfs rm -fR /mnt/tmpfs So, my question, assuming for the moment that nobody is able to read the cleartext in the tmpfs while it exists (I use umask to set cleartext to 0600), is there any way any trace of the cleartext could remain either in memory or on disk after the snippet above completes?

    Read the article

  • Mount shared folder (vbox) as another user

    - by jlcd
    I'm trying to mount my vbox shared folder every time my ubuntu starts. So, I added an entry on /etc/init with this: description "mount vboxsf Desktop" start on startup task exec mount -t vboxsf Desktop /var/www/shared Seems to work, except by the fact that all the files are owned by "root", and I don't have permission to write on the folder (neither chmod nor chown seems to be working). So, how can I make all the files under this shared folder to be owned by www-data user/group? Thanks ps.: The main reason for me to have an automatic shared folder, is so I can create/edit files from the HOST on the GUEST www folder. If you have a better idea for that, instead of sharing the folder, fell free to say.

    Read the article

  • Is there a way I can use $PATH as defined by my bash profile?

    - by Adam Backstrom
    I spend most of my day ssh'd into servers. I have a series of aliases/functions/scripts that allow me to type p hostname from the terminal and execute GNU screen(1) on the remote side, using the following command: exec ssh hostname -t 'screen -RD'` I've only recently noticed that ssh -t does not get my custom $PATH. Here's some terminal output: adam@workstation:~:0$ sh server 'echo $PATH' /home/adam/bin:/usr/local/bin:/bin:/usr/bin:/opt/git/bin:/opt/git/libexec/git-core adam@workstation:~:0$ ssh server -t 'echo $PATH' /usr/local/bin:/bin:/usr/bin Connection to uranus.plymouth.edu closed. My biggest problem is my custom aliases only try to execute screen, since I can't guarantee an absolute path, and my $PATH is structured so the shell should find the correct one. If my $PATH settings aren't honored, my scripts don't work. Is there a way I can use $PATH as defined by my .bashrc/.bash_profile? I believe PermitUserEnvironment is disabled.

    Read the article

  • How to do hooking in Java? [closed]

    - by chimpaburro
    A hook is a process running to get data from another (more info), well the case was that I wanted to get the methods or functions using any application for access to a network, these methods are usually WSAConnect (), WSASendTo (), bind (), connect () and sendto () [these are the ones that need to get to the application]. I started testing, creating Runtime [Runtime.getRuntime (). exec (...)] with all possible methods [addShutdownHook (...);] and now I'm trying to ProcessBuilder [new ProcessBuilder (...);] and the famous BufferedReader [new BufferedReader (new InputStreamReader (proceso.getInputStream ()));] but I could not find the way to do it. Sorry for my bad English..

    Read the article

  • MSSQL Backup Question

    - by MJ
    I'm currently taking over for someone who was in charge of backing up over 250 servers on different platforms, until we hire a replacement. The main question I have is: If we use a backup software, such as Symantec backup exec, does this perform the correct backup for MSSQL Server? I was listening to Stack Overflow Podcast, and I heard them talk about you cannot just backup the SQL data files, but you also need the transaction log? So, if we just backup the whole machine, would we be able to recover it correctly, since we would be backing up the data file and the log? Thanks!

    Read the article

  • snmptt not translating traps, even with translate_log_trap_oid=1

    - by mbrownnyc
    I am having some trouble configuring snmptt to properly translate snmp traps. The following is a problem: /etc/snmp/snmptt.conf reflects: EVENT fgFmTrapIfChange .1.3.6.1.4.1.12356.101.6.0.1004 "Status Events" Critical FORMAT $* EXEC /usr/local/nagios/libexec/eventhandlers/submit_check_result $r "snmp_traps" 2 "$O: $+*" "$*" SDESC Trap is sent to the managing FortiManager if an interface IP is changed Variables: 1: fnSysSerial 2: ifName 3: fgManIfIp 4: fgManIfMask EDESC when a trap is received, /var/log/messages reflects: Sep 6 12:07:32 SNMPMANAGERHOST snmptrapd[15385]: 2012-09-06 12:07:32 <UNKNOWN> [UDP: [192.168.100.2]:162->[192.168.100.31]]: #012.1.3.6.1.2.1.1.3.0 = Timeticks: (707253943) 81 days, 20:35:39.43 #011.1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.12356.101.6.0.1004 #011.1.3.6.1.4.1.12356.100.1.1.1.0 = STRING: FGTNNNNNNNNN #011.1.3.6.1.2.1.31.1.1.1.1.10 = STRING: internal4 #011.1.3.6.1.4.1.12356.101.6.2.1.0 = IpAddress: 192.168.65.100 #011.1.3.6.1.4.1.12356.101.6.2.2.0 = IpAddress: 255.255.255.0 Sep 6 12:07:37 SNMPMANAGERHOST icinga: EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT; 192.168.100.2; snmp_traps; 2; enterprises.12356.101.6.0.1004: enterprises.12356.100.1.1.1.0:FGTNNNNNNNNN ifName.10:internal4 enterprises.12356.101.6.2.1.0:192.168.65.100 enterprises.12356.101.6.2.2.0:255.255.255.0 Since the icinga entry reflects the EXEC, it's obvious there is no translations occurring by snmptt. I have verified that translate_log_trap_oid and net_snmp_perl_enable is enabled in snmptt.ini When using --debug=1 to start snmptt, I see the following in the --debugfile: ********** Net-SNMP version 5.05 Perl module enabled ********** The main NET-SNMP version is reported as NET-SNMP version: 5.5. What else can be done to verify that snmptt is configured properly to translate traps? I have run snmptt-net-snmp-test to verify whatever net-snmp-perl version I have installed properly supports translations. The output indicates it does. /root/snmptt_1.3/snmptt-net-snmp-test --best_guess=2 SNMPTT Net-SNMP Test v1.0 (c) 2003 Alex Burger http://snmptt.sourceforge.net MIBS:RFC1213-MIB best_guess: 2 Testing translateObj ******************** Testing: .1.3.6.1.2.1.1.1, long_names=disabled, include_module=disabled Test passed. Result: sysDescr Testing: .1.3.6.1.2.1.1.1, long_names=disabled, include_module=enabled Test passed. Result: RFC1213-MIB::sysDescr Testing: .1.3.6.1.2.1.1.1, long_names=enabled, include_module=disabled Test passed. Result: .iso.org.dod.internet.mgmt.mib-2.system.sysDescr Testing: .1.3.6.1.2.1.1.1, long_names=enabled, include_module=enabled Test passed. Result: RFC1213-MIB::.iso.org.dod.internet.mgmt.mib-2.system.sysDescr Testing: sysDescr, long_names=disabled, include_module=disabled Test passed. Result: .1.3.6.1.2.1.1.1 Testing: RFC1213-MIB::sysDescr, long_names=disabled, include_module=disabled Test passed. Result: .1.3.6.1.2.1.1.1 Testing: system.sysDescr, long_names=disabled, include_module=disabled Test passed. Result: .1.3.6.1.2.1.1.1 Testing: RFC1213-MIB::system.sysDescr, long_names=disabled, include_module=disabled Test passed. Result: .1.3.6.1.2.1.1.1 Testing: .iso.org.dod.internet.mgmt.mib-2.system.sysDescr, long_names=disabled, include_module=disabled Test passed. Result: .1.3.6.1.2.1.1.1 Testing getType *************** Testing: .1.3.6.1.2.1.4.1 Test passed. Result: INTEGER Testing: ipForwarding Test passed. Result: INTEGER Testing Description ******************* Test passed. Result: ------------------------------------------------- The indication of whether this entity is acting as an IP gateway in respect to the forwarding of datagrams received by, but not addressed to, this entity. IP gateways forward datagrams. IP hosts do not (except those source-routed via the host). Note that for some managed nodes, this object may take on only a subset of the values possible. Accordingly, it is appropriate for an agent to return a `badValue' response if a management station attempts to change this object to an inappropriate value. ------------------------------------------------- I have manually gone through the MIB with the definition that's not resolving, and verified that it is properly linking back to the proper resolved definition. It is: FORTINET-FORTIGATE-MIB.txt contains: fgFmTrapIfChange NOTIFICATION-TYPE OBJECTS { fnSysSerial, ifName, fgManIfIp, fgManIfMask } STATUS current DESCRIPTION "Trap is sent to the managing FortiManager if an interface IP is changed" ::= { fgFmTrapPrefix 1004 } fgFmTrapPrefix OBJECT IDENTIFIER ::= { fgMgmt 0 } fgMgmt OBJECT IDENTIFIER ::= { fnFortiGateMib 6 } fnFortiGateMib ::= { fortinet 101 } IMPORTS FnBoolState, FnIndex, fnAdminEntry, fnSysSerial, fortinet FROM FORTINET-CORE-MIB fortinet MODULE-IDENTITY ::= { enterprises 12356 } LOOKS GOOD!!!!! 1.3.6.1.4.1.12356.101.6.0.1004 I've exhausted all the documentation and even posted fruitlessly in the snmptt-users mailing list. I can not prove it is the MIB. Why would snmptt fail to translate traps? Thanks, Matt

    Read the article

  • sed works properly in SSH, not in PHP

    - by David
    So, I have the following line that I run in PHP with exec($addPHPtags); $addPHPtags = "/bin/sed -i '/<BODY BGCOLOR=\"#FFFFFF\">/ a\ <?php \n ?> '" . $instance['file'] . " 2>&1"; I'd expect that command to find the key and append it with a php tag. However, when I run it in PHP, I get the following error if I trap command output: [0] => /bin/sed: -e expression #1, char 39: unknown command: `?' However, if I run the same command in SSH, it works completely fine: /bin/sed -i '/<BODY BGCOLOR=\"#FFFFFF\">/ a\ <?php \n ?>' file.php I'm out of ideas, I've tried various alternatives but to no avail. Any help ? Thanks.

    Read the article

  • Client backup solution for small (100-150 user) homogenous win/nix/mac office?

    - by Gomibushi
    We are currently using Symantec Backup Exec with Desktop and Laptop Option for our Windows clients, time machine for mac and offer simple rsync to linux users, in addition to home folders that are always backed up and available. We are not overly happy with the horrid complexity and multitude of minor bugs in SBE, but "when you don't touch it, it mostly works". Ideally we'd like to offer a real and full backup solution to all clients, but mostly to Linux users, as they don't have a good alternative. I have barely tested Druva on windows, and it is promising in its simplicity and "it just works" looks, but does anyone have experience with it? This post lists some that I will look at.

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >