General :: Running Multiple Commands Remotely Via SSH In A Script?

Dec 18, 2009

In a script I am writing I am trying to add logic so that the script can figure out if a remote server uses rpm or dpkg and then run the appropriate command to print a list of installed packages. This works locally, but I need to get it to work through SSH and I have no idea how to do that. The relevant portion of the script is below. It would also be nice to find a way to not need the full path to the executables but I'm not real concerned about that.So anyone know how to make this code work via SSH?

Code:
if [ -x /usr/bin/dpkg ]; then
dpkg --get-selections

[code]...

View 4 Replies


ADVERTISEMENT

General :: Executing Commands Remotely Using Scripts?

Jul 8, 2010

For routine tasks i have to execute commands on machines running both winxp and linux. I usually do it via telnet. But the process is very manual as i have to authenticate for each machine then specify the command.

Is there any way that i could automate this job using a script or so?

View 10 Replies View Related

General :: How To Execute Multiple Commands When Using Find

Jan 22, 2011

I'm trying to run multiple commands on things I have found, how can I achieve this? find . -exec cmd1; cmd2 does not seem to work; it instead runs cmd2 after cmd1 has been executed on every file.

View 2 Replies View Related

General :: Redirect Stdout/stderr Of Multiple Commands In One Shot?

Jun 3, 2011

I have several commands in a bash script, and in the middle of the script there are several commands whose output and error streams I want to redirect to a file. I think I could simply add '>> myfile.txt' to the end of every command, but is there a way to set it before that block of commands, then reset the streams to their original state at the end of that block?

View 1 Replies View Related

General :: Prevent RC Commands From Running?

Mar 17, 2011

I am running a shell script from a rc file in Linux. The shell script is going into a loop which runs for 8 hours. Now I want to prevent the shell script from running when Linux boots or I need to find a way to kill the shell script when it is running. I tried using killall, kill $! and Ctrl+C etc. Nothing seems to work. Can you suggest a way out. I am new to Linux.

View 2 Replies View Related

General :: Running SQL Commands From Within Bash

Aug 1, 2010

I would be running SQL commands (UPDATE/SELECT) from within my bash script. I am completely new to this subject. Is MYSQL used for this purpose? Alternatively, what is sqlplus?

View 6 Replies View Related

General :: Terminal Commands Running Behind The GUI?

Jan 10, 2010

Recently I gained interest in running command from the terminal, like rhythmbox-client --play-pause and vlc --open, but I could not find the vlc's pause command under vlc. there's a way I can have a terminal display the commands that run when I do some action. For example, when I click on pause in vlc, the terminal should show me what command it used to pause vlc. What's the closest ting I can get to this?

View 1 Replies View Related

General :: SVN Multiple Commands Single Revision - Add New Folders (with Contents) To The Repository?

Jun 18, 2010

I want to do something like svn add dir1 dir2; svn ci dir1 dir2 but have it be only 1 revision. Is there a way to do this? Is this the correct way to add new folders (with contents) to the repository? We are restructuring the trunk, so I cleared it out and plan on putting these directories with their contents in it.

View 1 Replies View Related

General :: Running Ssh Commands With Sudoers Login?

Dec 10, 2010

I added the following line in /etc/sudoers file

<username> ALL=(ALL) NOPASSWD:ALL

after adding this if I run any command it is not asking for the password. Now I need to shutdown the remote machine with sudoers user.

View 6 Replies View Related

General :: Does Running Commands Verbosely Make Them Slower

Jul 20, 2011

I've found myself using the -v flag for lots of applications less and less (especially for trivial stuff like tar and cp). However, when I did and I was, say, unzipping a large file, it would take longer than when I didn't use the -v flag.I assume this is because the terminal has to process the text and I'm filling up whatever buffer it might have. But my question is, does this make the application actually run slower or does it complete in the same amount of time and what I'm seeing is the terminal trying to catch up?

View 5 Replies View Related

General :: Commands To Display Running Processor Number Id?

Jan 24, 2011

I have 8 cores system, but I only want to use 4 cores of it. Are there any commands to show which cores are running tasks?

View 1 Replies View Related

General :: Changing User And Running Commands Inside Of A Script?

Feb 22, 2011

My current script is as followed:

Code:

#!/bin/sh
su et
cd "media/ET"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.

[code]....

I want ET to be run as the user "et" and for some reason, I can't directly su/sudo to run the file without being in the user "et" and the "/media/ET" directory.

View 2 Replies View Related

Slackware :: Possible To Keep Pan Instance Keep Running Remotely Ssh?

Feb 21, 2011

is it possible to run for instance pan remotely via ssh and make that instance of pan running on server, regardless upon closing it via ssh?for example i would love to do: start pan instance via ssh on the server keep it open while downloading close the ssh session, keep the pan running on the server in background. open ssh session and access the same instance of pan running on the server etc something in that loop.im unable to do that because when i close pan ssh remotely the instance automatically terminates on the server.

View 8 Replies View Related

Ubuntu :: Detach Remotely Run X App And Leave Running?

Jan 3, 2011

I found this:[URL]

I'd like to be able to re-attach as well. Anybody know if this is possible and, if yes, how?

View 2 Replies View Related

General :: Way To Have Multiple X Severs Running In Different Shells?

May 24, 2010

Is there any way to have x server on multiple shells at a time?(eg. Sally is logged in on shell 6 with her own desktop cube while Rob is logged in on shell 7 with his own desktop cube, etc)

View 2 Replies View Related

Fedora Networking :: Controlling A Running X Server Remotely?

Apr 11, 2009

*Solved* I have been reading the following guide on how to use the VNC programs and a GUI to connect to my main machine from my laptop via my LAN and router:

[URL]

This allows me to control the server remotely, and run applications on the server remotely, with the GUI output being shown on my laptop, which is really neat I had Eclipse + PDT running on my server and had to stop it and start a new instance remotely from the laptop via VNC viewer, as Eclipse said the workspace I wanted to use was already in use.

So starting the VNC server on the main machine does not allow me to access the programs that are already running on the main machine under the native X server. However I can now do PHP debugging remotely using Eclipse + PDT now, and all the PHP source code is on the server machine. That's OK, but I would like to do more than that. I want to be able to connect to the native X server on my main machine, and control all the applications running on the main machine remotely from my laptop, without having to shut them down and restart them again via a VNC viewer.

Is there some sort of remote control program I can use to allow me to connect to the running X server on my main machine from my laptop, and control those applications remotely please, so the desktop layout on the main machine's screen is mirrored on the laptop screen?

View 1 Replies View Related

Software :: Running Rc Scripts Remotely Doesn't Work

Jul 30, 2010

RHEL 5 update 2 I'm trying to start services from a centralized location on many servers. I can start/stop these services from an interactive login without any issue, but when I try the same command via ssh/rsh, it hangs. I have my ssh keys set up correctly and I can run other remote commands.

Local server:

# /etc/init.d/samba start
Starting Samba smbd: [ OK ]

Remotely to same server:

# ssh server "/etc/init.d/samba start"
Starting Samba smbd:
<hang>

View 3 Replies View Related

General :: Running A Program In Multiple Subdirectories Simultaneously

Jul 8, 2011

Performing commands in multiple subdirectories simultaneously. I'd like to run a program I've copied into every subdirectory which takes *.in files in the current directory as input files. I can find the program, but how do I tell it to run when I've found it?

View 1 Replies View Related

General :: Command Running Multiple Jobs On Servers

Jul 26, 2010

How to submit multiple jobs onto a Linux server. The only way I know to submit and run a job on a server is using qsub, and verifying the status of the job using qstat. I usually run my scripts using qsub -cwd so that I can run it on my own directory (instead of having the results sent to a scratch folder).

1. However, assuming qsub/msub are not available, is there another way to do it? What commands can I use instead?
2. I know that some jobs can run in the background, is that an alternative? How do I do it? And would I still be able to check the status of the job or delete it?

View 2 Replies View Related

Debian :: Running Same Process Multiple Times(from Another Account) / An Instance Of Newsbeuter Is Already Running Error?

Aug 6, 2010

Sometimes I connect to my Debian box from another computer (using SSH on Cygwin or Linux), and once ina while I want to run some console apps. And sometimes some of these apps might complain about "another intance, Error: an instance of newsbeuter is already running (PID: 2496)". Is there a work around for this issue at all(without killing the original instance") ? The reason I do not want to kill the app because there might be 2 users connected to the same machine that might be using the same app.

View 1 Replies View Related

Fedora :: Way To Remotely Access Work Station Running Windows XP

Oct 5, 2010

I run Fedora 13 on my HP dv6000 Pavillion. I am looking for a way to remotely access my work station running Windows XP from my Fedora machine. Most of the information I found explained how to access a Linux box from a Windows environment, and the one place I found that showed the other way around was incomprehensible.

Our company servers run Windows XP, and we have successfully installed remote desktops on other laptops running Windows.I thought of running the remote desktop from a Virtual Machine Windows session, but it seems a cumbersome way to do it.

View 3 Replies View Related

Server :: Image Cloning Application (Running Backup Remotely)

Jan 14, 2010

I need to backup my active production servers (yeah it's too late now) with image cloning application that were running RHEL3-5. The problem is I need to run it remotely from my office. Most of the software I found either need to use bootable cd or need to unmount my partitions which is I wasn't allowed to since it's a production servers. I also tried dd but it consume too much time, sector by sector cloning and empty disk space also included so the file created also big in size.

View 4 Replies View Related

General :: Windows - Running Multiple Operating Systems On One Laptop

Apr 23, 2011

I am in the process of running some benchmark tests on a variety of RDBMS, I am testing three different client operating systems.Would it be terrible to partition the HDD and install Ubuntu, Windows 7 and Solaris 10? If I do not do this, I will likely have to re-install the O.S numerous times due to changes in the database server o.s as well. The same question goes for the server; would it drastically effect the performance to install 3 server o.s on one server?

View 4 Replies View Related

General :: Bash_history File And Running Bash On Multiple Windows?

May 5, 2011

Despite the history file is unique (~/.bash_history) I see that the multiple bash processes run on different windows are not all updating that file. I presume that the bash is not taking into account this possibility (multiple bashes on multiple windows) and writes thus the history file in a simple straightforward way. This would mean that a number of history entries are lost. I've tried to find information but had no luck so far.

View 1 Replies View Related

General :: Firefox Terminates If Multiple Instances Of Flash Player Running?

Feb 17, 2010

If i have, say, ..... tab opened and if a click on some of the related videos (while it's still playing) firefox terminates. The same if I open ..... on one tab and myspace on another - firefox just shuts down.

I want to know why this happens, is it a bug and how can i fix it ?

View 2 Replies View Related

Ubuntu :: Multiple Commands At The Terminal?

Jan 21, 2010

I am in the process of coverting some video files to motion jpeg (Wii) files with ffmpeg (great program by the way). I have been successful and so the majority of my work is over. My question is simple (I think) but complex to me so... here it goes. Is there a way on one command line to "batch" convert 8 or 9 files together instead of one by one. I just don't know what to put on the command line. I took one UNIX class a long time ago and the terms pipe and such come to mind... but I forget. Any takers? That was I can write what I want the computer to do in the morning and just come back after work and voila...

View 6 Replies View Related

Software :: Can't Get Head Around The Commands Or How Multiple?

Jan 11, 2011

I'd like to convert some of my backed up ripped DVDs to an .avi with separate subtitle file. I have been looking at MEncoder but I can't get my head around the commands or how multiple .VOB files become a singular .avi file.

View 2 Replies View Related

General :: Running Bash But Common Bash Commands Not Working?

Jul 17, 2010

below are the details of my system. I have bash as my current shell, some really common commands aren't working.

Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])

Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$

[Code]....

View 13 Replies View Related

Ubuntu :: Application Launcher With Multiple Commands

Jan 27, 2011

I created a application launcher (type:terminal) to replace the index.php on my apache server (/var/www/) with the index I keep updated on my desktop.

This is the exact script I'm using on the launcher:

My idea was the launcher would delete the current file at /var/www/, and then copy the file on /home/andre/Desktop.

But its not behaving properly, it is deleting both the file in my /var/www/ AND my desktop.

View 2 Replies View Related

Ubuntu :: Gnome-terminal -e <multiple Commands>

Sep 1, 2011

With xterm, I can do the following, and the scripts are executed sequentially in a single xterm: xterm -e 'script1.sh;script2.sh' But with gnome-terminal, when I do: gnome-terminal -e script1.sh;script2.sh It runs them in parallel in 2 different terminals. I've tried a few combinations of ", and ', around the scrips, but no difference.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved