Sponsored Content
Special Forums IP Networking Execute script located on a remote machine Post 302666695 by gull04 on Thursday 5th of July 2012 04:30:13 AM
Old 07-05-2012
Hi,

You could do this a number of ways, rsh, ssh are just a couple pf examples.

Code:
davem@darkstar--> rsh polaris ls -l
[davem@polaris shm]# ls -l
total 281392
-rw-rw-rw-. 1 root  root    5668387 2006-12-29 20:04 ACFTREF
-rw-rw-rw-. 1 root  root      85970 2001-08-08 13:47 ardata.pdf
-rw-rw-rw-. 1 root  root      44619 2006-11-17 09:58 ARData.pdf
-rw-rw-rw-. 1 root  root    6937444 2006-12-29 20:05 DEALER
-rw-rw-rw-. 1 root  root   33477137 2006-12-29 20:11 DEREG
-rw-r--r--. 1 root  root    9939544 2012-07-04 21:01 dereg_wrk01
-rw-r--r--. 1 root  root    9619084 2012-07-04 21:01 dereg_wrk02
-rw-r--r--. 1 root  root     240392 2012-07-04 21:01 dereg_wrk03
-rw-r--r--. 1 root  root     240392 2012-07-04 21:01 dereg_wrk04
-rw-r--r--. 1 root  root   10099868 2012-07-04 21:01 dereg_wrk05
-rw-r--r--. 1 root  root    4370327 2012-07-04 21:01 dereg_wrk06
-rw-rw-rw-. 1 root  root    5247997 2006-12-29 17:30 DOCINDEX
-rw-rw-rw-. 1 root  root     183409 2006-12-29 20:05 ENGINE
-rw-rw-rw-. 1 root  root      39799 2000-07-06 14:19 format.pdf
-rw-r--r--. 1 root  root       1946 2012-07-05 07:52 input_file_list
-rw-rw-rw-. 1 root  root  100457929 2006-12-29 20:10 MASTER
-rw-r--r--. 1 root  root   12132352 2012-07-05 08:21 mast_wrk00
-rw-r--r--. 1 root  root          0 2012-07-05 08:20 mast_wrk01
-rw-r--r--. 1 root  root   18716339 2012-07-05 08:20 mast_wrk02
-rw-r--r--. 1 root  root   43883632 2012-07-05 08:21 mast_wrk03
-rw-rw-r--. 1 davem davem  12771975 2012-07-04 16:21 new.csv
-rw-rw-r--. 1 davem davem   1093330 2012-07-04 16:52 nomatch
-rw-r--r--. 1 root  root    2101362 2012-07-05 08:21 ref_wrk00
-rw-r--r--. 1 root  root          0 2012-07-05 07:52 ref_wrk01
-rw-r--r--. 1 root  root    2099001 2012-07-05 08:20 ref_wrk02
-rw-rw-rw-. 1 root  root    7453821 2006-12-29 20:04 RESERVED
-rw-rw-r--. 1 davem davem    775151 2012-07-04 16:19 wrong.csv
[davem@polaris shm]

You just have to make sure the correct configs are set up - and that there is some reasonable degree of security in place.

Regards

Dave
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to execute a script on remote machine

hi unix guru's i am new to unix shell programming. i found a trouble in executing a script(bali.ksh) which is available on serverA with username xyza, this script contains sqlplus command to retrive the data from the database available on other serverC. Now i need to run the above script... (4 Replies)
Discussion started by: balireddy_77
4 Replies

2. Shell Programming and Scripting

Execute command from terminal on remote machine

Hi All, I want to execute some commands on unix machine from the mac machne. I have two options for doing so, I am confused which is the best way of doing. Here are two options. Requirement: Execute command on the remote server machine. Commands to be executed itself contain arguments to be... (0 Replies)
Discussion started by: Ranu
0 Replies

3. Shell Programming and Scripting

How to execute a script hosted on a machine from a different machine

Hi everyone I intend to trigger a script from one machine say mc1 that actually excutes on different machine say mc2 and redirect the logs to that machine mc2. I tried to use nohup <nfs location of machine >/script.sh > <nfs location of machine >/script.log 2>&1 & nfs location of... (2 Replies)
Discussion started by: harneetmakol
2 Replies

4. Shell Programming and Scripting

Change user on remote machine and execute script!

Hi, I need to login into remote server and execute a shell script over there. As of now i am making use of ssh command ssh primUser@135.254.242.2 sh /poll.sh I am logging in as primUser but unless i change the user to root the script execution on the remote machine is not possible. ... (5 Replies)
Discussion started by: goutham4u
5 Replies

5. Shell Programming and Scripting

unix shell script which inserts some records into a file located in remote servers...

All, I need to write an unix shell script which inserts some records into a file located in remote servers. * Get the input from the user and insert according the first row. It should be in ascending order. 123451,XA,ABA 123452,XB,ABB 123453,XC,ABC 123455,XE,ABE 123456,XF,ABF 123458,XG,ABG... (2 Replies)
Discussion started by: techychap
2 Replies

6. Shell Programming and Scripting

To execute the same script in another machine

We have a few machines which share the same directory. How can I execute the same script under that directory in different machine while I am using mine? (1 Reply)
Discussion started by: jiao
1 Replies

7. Shell Programming and Scripting

How to execute the same script on another machine

Recently, I need to generate a lot of files from a few master files. In fact, if I relogin to the server machine, my operating would be much faster. My question is this: Can I write a script in which the current path can be automatically saved and relogin to the server to execute my command in the... (0 Replies)
Discussion started by: jiao
0 Replies

8. UNIX for Dummies Questions & Answers

Execute shell script in remote machine

Hi All, We have 2 servers A and B. B is having a sctipt called b.sh in path /home/dev/scripts. Now my requirement is i want to execute b.sh from server A. Kindly help me. (3 Replies)
Discussion started by: Girish19
3 Replies

9. Shell Programming and Scripting

Execute shell script on remote machine

I want to execute a shell script(set of commands) on remote machine and that script takes input from text file(local machine). Please refer below: ssh user@hostname 'bash -s'< ./test.sh file.txt But i got the error file.txt doesn't exist. Can anyone help me on this. Content of test.sh: ... (2 Replies)
Discussion started by: manishtri88
2 Replies

10. Shell Programming and Scripting

How can I execute local script on remote machine and include arguments?

I have a script in local server cd /home/dell/work/BOP/testdir ./processchk po (here processchk is a script & po is passed as an argument) Now I want to execute this script from remote server ssh $username@$hostname "cd /home/dell/work/BOP/testdir; ./processchk po" But Its getting error... (9 Replies)
Discussion started by: manohar2013
9 Replies
SYSTEMD-VOLATILE-ROOT.SERVICE(8)			   systemd-volatile-root.service			  SYSTEMD-VOLATILE-ROOT.SERVICE(8)

NAME
systemd-volatile-root.service, systemd-volatile-root - Make the root file system volatile SYNOPSIS
systemd-volatile-root.service /lib/systemd/systemd-volatile-root DESCRIPTION
systemd-volatile-root.service is a service that replaces the root directory with a volatile memory file system ("tmpfs"), mounting the original (non-volatile) /usr inside it read-only. This way, vendor data from /usr is available as usual, but all configuration data in /etc, all state data in /var and all other resources stored directly under the root directory are reset on boot and lost at shutdown, enabling fully stateless systems. This service is only enabled if full volatile mode is selected, for example by specifying "systemd.volatile=yes" on the kernel command line. This service runs only in the initial RAM disk ("initrd"), before the system transitions to the host's root directory. Note that this service is not used if "systemd.volatile=state" is used, as in that mode the root directory is non-volatile. SEE ALSO
systemd(1), systemd-fstab-generator(8), kernel-command-line(7) systemd 237 SYSTEMD-VOLATILE-ROOT.SERVICE(8)
All times are GMT -4. The time now is 01:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy