Search Results

Search found 9551 results on 383 pages for 'john shell'.

Page 9/383 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to partially ftp a file (using ftp, wget with shell scripts or php)?

    - by Dave
    hi, i want to partially download a ftp file. i just need to download lets say 10MB, but after skipping 100MB (for example). In php, http://php.net/manual/en/function.ftp-fget.php this function allows arbitay starting point: bool ftp_fget ( resource $ftp_stream , resource $handle , string $remote_file , int $mode [, int $resumepos = 0 ] ) however it does not allow me to set "how many bytes" i want to download.

    Read the article

  • How to resume an ftp download at any point? (shell script, wget option)?

    - by Dave
    hi! i want to download a huge file from an ftp server in chunks of 50-100MB each. At each point, i want to be able to set the "starting" point and the length of the chunk i want. i wont have the "previous" chunks saved locally (ie i cant ask the program to "resume" the downlaod). what is the best way of going about that? i use wget mostly, but would something else be better?

    Read the article

  • How to execute a command on multiple hosts using IPv6 only?

    - by math
    First of all there is pdsh which is essentially a parallel distributed shell which may execute commands on a list of given hosts. However, I find myself in an IPv6 only problem setting. It seems that pdsh is not able to use IPv6, as I am getting error messages: pdsh -w ^hostnames my_command pdsh@myhost: gethostbyname("foobar") failed I also tried to use IPv6 addresses only, which also didn't work. So how do you run a single shell script for administrative purpose (no SGE stuff, or similar) on a bunch of hosts that is IPv6 reachable only?

    Read the article

  • Window out of the screen when maximized using WPF shell integration library

    - by Eduardo Molteni
    I'm using the WPF Shell Integration Library to create a custom chrome of my wpf app. All is good, but when maximizing the app, 6 or 7 pixels are out of the screen. This is the code I'm using: <Style TargetType="{x:Type local:MainWindow}"> <Setter Property="shell:WindowChrome.WindowChrome"> <Setter.Value> <shell:WindowChrome ResizeBorderThickness="6" CaptionHeight="10" CornerRadius="0" GlassFrameThickness="1"/> </Setter.Value> </Setter> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:MainWindow}"> <Grid> <Border BorderThickness="1" BorderBrush="#389FD1" Background="#389FD1"> <ContentPresenter Margin="0,22,0,0" Content="{TemplateBinding Content}"/> </Border> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" > <TextBlock Text="{Binding NombreUsuario}" Foreground="White" Margin="5,5,20,5" Opacity=".8" /> <Button Style="{StaticResource ImageButton}" Height="20" Width="20" Margin="0" Click="WindowMinimize" shell:WindowChrome.IsHitTestVisibleInChrome="True"> <Image Height="10" Width="10" Source="/Resources/Images/minimize.png" /> </Button> <Button Style="{StaticResource ImageButton}" Height="20" Width="20" Margin="0" Click="WindowMaximizeRestore" shell:WindowChrome.IsHitTestVisibleInChrome="True" > <Image Height="10" Width="10" Source="/Resources/Images/maximize.png" /> </Button> <Button Style="{StaticResource ImageButton}" Height="20" Width="20" Margin="0" Click="WindowClose" shell:WindowChrome.IsHitTestVisibleInChrome="True"> <Image Height="10" Width="10" Source="/Resources/Images/close.png" /> </Button> </StackPanel> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • AutoRestart Custom Shell .Net App

    - by MattH
    We have a .Net application that runs as a shell for certain users. We'd like the application to automatically restart when it crashes. The application is set as the shell here: HKEY_USERS*User*\Software\Microsoft\Windows NT\WinLogon\Shell I've tried adding an "AutoRestartShell" key with a value of "1", like what exists in: HKLM\Software\Microsoft\Windows NT\WinLogon. When I kill the application's process for the user (via RDP) the application exits, but never restarts. Ideas?

    Read the article

  • Using bash shell from within PHP

    - by Dan
    Hi everyone, In my terminal window (using Max OS X) my shell is bash. However when I run a command in PHP via shell_exec or backtick operators I see that PHP is using the Bourne Shell (sh). Here's an example of what I'm seeing: From within my terminal window: $ echo $0 - bash Also if I call php as follows: $ php -r "echo shell_exec('echo $0');" -bash However, if I create a script called test.php with the following: <?php echo shell_exec('echo $0'); ?> And then run test php I get the following: $ php test.php sh I'm wanting to use the bash shell when calling shell_exec - why is it choosing the Bourne shell and can I force it to use bash? Thanks! Dan

    Read the article

  • Need to copy remotely hosted file vis Shell Command

    - by pnm123
    Hello, There is a file that hosted remotely on a server that is not supporting Shell Access. I bought a new server that supports Shell Access so now I want to copy a file that is on the non-supporting server to new server via a Shell Command using Putty. File url is like this http://www.domain.com/file.gzip and it is username/password protected. If I be more specified, I want to copy a backup of a home directory from cPanel to my new server via Shell command. I have done this few months ago but I don't remember it now and also I failed to google it. Thank you, Prasad

    Read the article

  • AutoRestart Custom Shell App

    - by MattH
    We have a .Net application that runs as a shell for certain users. We'd like the application to automatically restart when it crashes. The application is set as the shell here: HKEY_USERS*User*\Software\Microsoft\Windows NT\WinLogon\Shell I've tried adding an "AutoRestartShell" key with a value of "1", like what exists in: HKLM\Software\Microsoft\Windows NT\WinLogon. When I kill the application's process for the user (via RDP) the application exits, but never restarts. Ideas?

    Read the article

  • Need to copy remotely hosted file via Shell Command

    - by pnm123
    There is a file that hosted remotely on a server that is not supporting Shell Access. I bought a new server that supports Shell Access so now I want to copy a file that is on the non-supporting server to new server via a Shell Command using Putty. File url is like this http://www.domain.com/file.gzip and it is username/password protected. To be more specific, I want to copy a backup of a home directory from cPanel to my new server via Shell command. I have done this few months ago but I don't remember it now and also I failed to Google it.

    Read the article

  • Shell Script Launching Child Processes

    - by Matt James
    Disclaimer: I'm totally new to shell scripting, but have quite a bit of experience in other languages like PHP and Obj-C. I'm writing my first daemon script. Here are the goals: I want it to run in the background I want it to be triggered by an init.d script that includes start/stop/restart commands I want each process in a loop to trigger its own subprocess. When the parent process kicked off by the init.d script is killed, I want the subprocesses to die as well. Essentially, I'm looking for the same kind of behavior that appears to be very common among software like apache, spamd, dovecot, etc. But, based on my research, I haven't found a single, simple answer as to how this kind of thing is achieved. Any help is greatly appreciated.

    Read the article

  • Remove Shell Extension Folder X64

    - by Florian Peschka
    I have a very strange shell extension folder which I just can't get rid of. How can I get rid of this? I already downloaded ShellExViewer, but I cannot find any extension called "X64", nor are the other extensions which reside in that folder anywhere in the Viewer. I am also not able to find that folder in the registry, but that's probably because I don't know where to look. How can I edit this so the contents of the folder are put in the "default" menu and not in a subfolder?

    Read the article

  • Mapping a Piped Shell Command in Vim

    - by michaelmichael
    In a previous question I asked about mapping evaluated code to a new window in MacVim. I got a great solution, but it presented another question: How can I map a key command in my .vimrc that involves piping output in the shell? As a simple example, let's say I wanted to pipe the results of ls -a to a new MacVim window. From the Vim command line I can enter !ls -a | mvim -, and the results will appear in a new window. Great! Now, I add that to my .vimrc: nmap <Leader>r :w !ls | mvim<CR> Vim now throws an error every time I try to source my .vimrc, which reads as follows: E492: Not an editor command: mvim<CR> Any ideas on how to overcome this?

    Read the article

  • Load login shell inside user cronjob

    - by sa125
    I'm trying to run a rake task using a scheduled cronjob. My crontab looks something like this: 0 1 * * 1-7 /bin/bash -l -c "cd ~/jobs/rake && rake reports:create >> ~/jobs/logs/cron.log" Ruby on my account is provided by RVM, which is loaded via ~/.bashrc (before the no-interaction check): # load RVM env [[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm # If not running interactively, don't do anything [ -z "$PS1" ] && return # ... rest of logic Time and again, this task fails to run since RVM isn't loaded when the task is called (uses system's /usr/bin/ruby instead), and gem dependencies are missing. How can I make crontab load my shell environment before executing my scheduled jobs? thanks.

    Read the article

  • Python: Check existence of shell command before execution

    - by Gabriel L. Oliveira
    Hi all. I'm trying to find a way to check the existence of a shell command before its execution. For example, I'll execute the command ack-grep. So, I'm trying to do: import subprocess from subprocess import PIPE cmd_grep = subprocess.Popen(["ack-grep", "--no-color", "--max-count=1", "--no-group", "def run_main", "../cgedit/"], stdout=PIPE, stderr=PIPE) Than, if I execute cmd_grep.stderr.read() I receive '' like the output. But I don't have the command ack-grep on my path. So, why Popen is not putting the error message on my .stderr variable? Also, is there a easyer way to do what I'm trying to do?

    Read the article

  • Memeory Leak in Windows Page file when calling a shell command

    - by Arno
    I have an issue on our Windows 2003 x64 Build Server when invoking shell commands from a script. Each call causes a "memory leak" in the page file so it grows quite rapidly until it reaches the maximum and the machine stops working. I can reproduce the problem very nicely by running a perl script like for ($count=1; $count<5000; $count++) { system "echo huhu"; } It is independent of he scripting language as the same happens with lua: for i=1,5000 do os.execute("echo huhu") end I found somebody describing the same issue with php at http://www.issociate.de/board/post/454835/Memory_leak_occurs_when_exec%28%29_function_is_used_on_Windows_platform.html His solution: Firewall/Virus Scanner does not apply, neither are running on the machine. We can also reproduce the issue on other Developer Machines running XP 64, but not on XP 32 Bit. The guilty guy for the allocation is C:\WINDOWS\System32\svchost.exe -k netsvcs which runs all the basic Windows services. Does anybody know the issue and how to resolve it ?

    Read the article

  • Change/Deactivate the shell for an amount of users on SUSE Enterprise Server

    - by Manfred Schmidt
    I have a SUSE Server to which ~300 users are connecting. About 100 of them have to be deactivated. I think it would be nice to change their shell to /bin/false either with chsh or with usermod. Do I have to type every command per line, or can I fill out a list of users which can be read from the script? I should mention that all of the 100 users have the same ending in their username. Can I work with wildcards here? e.g. usermod -s /bin/fish *ftpuser chsh -s /sbin/nologin *ftpuser

    Read the article

  • Gnome-shell fails to load on 12.10

    - by Githlar
    I'm usually the one answering questions, but in this I'm throughly stumped! My Setup: Ubuntu 12.10 (Dist upgrade form 12.04) ATI M96 [Mobility Radeon HD 4650] Upon the first installation of 12.10 I had all kinds of issues getting the Legacy ATI drivers to install (I guess the source for the drivers isn't kosher with kernel 3.5). So, I added the repository ppa:makson96/fglrx - which has a version of the ATI source patched to work with kernel 3.5. After installation of fglrx-legacy from that PPA, gnome-shell and all my graphics work fine... until today. The Problem I unsuspended my computer today and the screen was black (not off, the black from the gnome lock screen). I'd move my mouse/hit a key and the background would flash and then it'd go back to black. Restarted via VT1 Logged into Gnome (gnome-shell) session, but no gnome-shell! Investigation: First, I went to VT1 and tried export DISPLAY=:0;gnome-shell --replace. It appeared to work fine, switch back to X and nothing. Went back to VT1 and saw this error message: JS ERROR: !!! Exception was: TypeError: Object 0x7fc748129c30 is not a subclass of (null), it's a xO JS ERROR: !!! message = '"Object 0x7fc748129c30 is not a subclass of (null), it's a xO"' JS ERROR: !!! fileName = '"/usr/share/gnome-shell/js/ui/tweener.js"' JS ERROR: !!! lineNumber = '218' JS ERROR: !!! stack = '"()@/usr/share/gnome-shell/js/ui/tweener.js:218 wrapper()@/usr/share/gjs-1.0/lang.js:204 ()@/usr/share/gjs-1.0/lang.js:145 ()@/usr/share/gjs-1.0/lang.js:239 init()@/usr/share/gnome-shell/js/ui/tweener.js:49 init()@/usr/share/gnome-shell/js/ui/environment.js:96 @<main>:1 "' Window manager warning: Log level 32: Execution of main.js threw exception: TypeError: Object 0x7fc748129c30 is not a subclass of (null), it's a xO Note: Everywhere it says "it's a xO", xO is actually garbled and changes every time (I'm thinking memory corruption?) This error is thrown by line 96 of /usr/share/gnome-shell/js/ui/environment.js: tweener.Init() Did a purge of fglrx-legacy, reboot, reinstall fglrx-legacy, reboot... same thing. Did a ppa-purge of ppa:gnome3-team/gnome3, and reinstalled gnome-shell and ubuntu-desktop from the standard repositores... same thing. I'm really at a loss here. I love gnome-shell and after using it for nearly a year now gnome classic just seems so archaic. Additional Information Apt log from the day I first suspended my machine (these are upgrades from the gnome3-team/gnome3 ppa and ubuntu-wine/ppa ppa): Start-Date: 2012-11-24 17:30:28 Commandline: aptdaemon role='role-commit-packages' sender=':1.618' Install: gkbd-capplet:amd64 (3.6.0-0ubuntu1), gnome-control-center-unity:amd64 (1.0-0ubuntu1~ubuntu12.10.1) Upgrade: nautilus:amd64 (3.6.2-0ubuntu0.1~quantal1, 3.6.3-0ubuntu2~ubuntu12.10.1), libgnome-control-center1:amd64 (3.4.2-0ubuntu19, 3.6.3-0ubuntu6~ubuntu12.10.1), wine1.5-i386:i386 (1.5.17-0ubuntu4, 1.5.18-0ubuntu1), wine1.5:amd64 (1.5.17-0ubuntu4, 1.5.18-0ubuntu1), gnome-settings-daemon:amd64 (3.4.2-0ubuntu14, 3.6.3-0ubuntu1~ubuntu12.10.1), gnome-control-center-data:amd64 (3.4.2-0ubuntu19, 3.6.3-0ubuntu6~ubuntu12.10.1), gnome-accessibility-themes:amd64 (3.6.0.2-0ubuntu1, 3.6.2-0ubuntu2~ubuntu12.10.1), gnome-themes-standard:amd64 (3.6.0.2-0ubuntu1, 3.6.2-0ubuntu2~ubuntu12.10.1), wine1.5-amd64:amd64 (1.5.17-0ubuntu4, 1.5.18-0ubuntu1), nautilus-data:amd64 (3.6.2-0ubuntu0.1~quantal1, 3.6.3-0ubuntu2~ubuntu12.10.1), gnome-control-center:amd64 (3.4.2-0ubuntu19, 3.6.3-0ubuntu6~ubuntu12.10.1), libnautilus-extension1a:amd64 (3.6.2-0ubuntu0.1~quantal1, 3.6.3-0ubuntu2~ubuntu12.10.1) End-Date: 2012-11-24 17:31:32 fglrxinfo (driver appears to be working): display: :0 screen: 0 OpenGL vendor string: Advanced Micro Devices, Inc. OpenGL renderer string: ATI Mobility Radeon HD 4650 OpenGL version string: 3.3.11653 Compatibility Profile Context Does anybody have any further ideas?

    Read the article

  • Run shell command with variable in filename via Python

    - by rajitha
    I have files with naming convention st009_out.abc1.dat st009_out.abc2.dat st009_out.abc3.dat .................. .................. I am writing Python code where I want to use data from the file to perform a math function and need to extract the second column from the file. I have tried it this way: for k in range(1,10): file1=open('st009_out.abc'+str(k)+'.dat','r') ........... os.system("awk '{print $2}' st009_out.abc${k}.pmf > raj.dat") but this is not working as it is not taking the value of k in the shell command. How do I progress?

    Read the article

  • How to columnate text with tabs (in vim or on the shell)

    - by kine
    I have a frequent need to manually manipulate tab-delimited text for data entry and other purposes, and when i do this it helps if the text is aligned properly into columns. For example (assuming 4-space tabs): # original format abcdefghijklmnop field2 abcdefgh field2 abcdefghijkl field2 # ideal format abcdefghijklmnop field2 abcdefgh field2 abcdefghijkl field2 I am very familiar with using the column utility to columnate text this way, but the problem is that it uses spaces to align the columns, and i specifically need tabs. This requirement also appears to rule out the Tabularize plug-in. Is there any way that i can columnate text with tabs specifically, either within vim or at the shell? It looks like i might be able to do it with groff/tbl, but honestly i'd rather columnate it by hand than mess with that....

    Read the article

  • Setting http_proxy for Chromium in shell

    - by iceboal
    In order to set proxy in Chromium browser, one needs to go to Settings ? Under the Hood ? Change Proxy Settings ? Network Proxy. It's too complicated. How do I set http_proxy in shell? I've tried export http_proxy=http://127.0.0.1:8080/ But it doesn't seem to work. Also, if you only want to set the proxy on the Chromium browser -- not your entire network -- the command line is the only way to set the proxy just for the browser. How can one set the proxy on Chromium -- using the command line -- to solve this problem?

    Read the article

  • Would shell command join cause out of memory?

    - by Hancy
    I have two file to join. FILE 1: a A1 a A2 a A3 ... c C1 c C2 ... FILE 2: a feature1_of_a a feature2_of_a ... a featureN_of_a ... ... c feature1_of_c c feature2_of_c ... after join, i could get File like this: A1 feature1_of_a A2 feature1_of_a A3 feature1_of_a A1 feature2_of_a A2 feature2_of_a A3 feature2_of_a ... A1 featureN_of_a A2 featureN_of_a A3 featureN_of_a ... In order to do that: i wrote shell command join -11 -21 -o1.2,2.2 file1 file2. But the problem is: number N might be huge. So if join read all feautre of a into memory at once, memory might not be enough. I don't know how join is implemented. WQould the momery become a problem? If so, is there any way to get what I want?

    Read the article

  • Shell script to read value from a file and compare it to another one

    - by maneeshshetty
    I have a C program which puts one unique value inside a test file (it would be a two digit number). Now I want to run a shell script to read that number and then compare with my required number (e.g. 40). The comparison should deliver "equal to" or "greater". For example: The output of the C program is written into the file called c.txt with the value 36, and I want to compare it with the number 40. So I want that comparison to be "equal to" or "greater" and then echo the value "equal" or "greater".

    Read the article

  • Kill program after it outputs a given line, from a shell script

    - by Paul
    Background: I am writing a test script for a piece of computational biology software. The software I am testing can take days or even weeks to run, so it has a recover functionality built in, in the case of system crashes or power failures. I am trying to figure out how to test the recovery system. Specifically, I can't figure out a way to "crash" the program in a controlled manner. I was thinking of somehow timing a SIGKILL instruction to run after some amount of time. This is probably not ideal, as the test case isn't guaranteed to run the same speed every time (it runs in a shared environment), so comparing the logs to desired output would be difficult. This software DOES print a line for each section of analysis it completes. Question: I was wondering if there was a good/elegant way (in a shell script) to capture output from a program and then kill the program when a given line/# of lines is output by the program?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >