When using SSH to run a command on a remote machine you need to group the command and its parameters together otherwise on the command is run on the remote machine, I would therefore try:
HTH
Hi. I'm sorry if I get on people's nerves asking this, but I don't really understand how to do this and unfortunately don't have the time to work through it step by step in books, etc.
At University, we have a unix server that hosts our files. we each have a login and password to access it. I... (3 Replies)
Hi All,
I am using following find command to delete the records older than 7 days but getting missing conjuction error.Kindly suggest:
The command is:
find <complete_dir_path> \(! -name usr -prune \) -type f -name "*.txt" -mtime +6 -print | xargs rm (11 Replies)
Hi,
I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script.
I am planning to do like this:
if ; then... (2 Replies)
Hello,
We are using Solaris 2.5.1 box. And we are accessing to Solaris from Windows xp using Cygwin/X. The connection establish without any problem and we can use desktop environment. But, sometimes later ( various between 2 minutes to 10 minutes ) Connectted desktop display is frozen. Mouse is... (4 Replies)
Hi ,
I am trying to find some files on a remote machine using the find command.
>ssh -q atukuri@remotehostname find /home/atukuri/ -name abc.txt
/home/atukuri/abc.txt
The above command works fine and lists the file, but if I want to do a long listing of files (ls -l) its not working . ... (2 Replies)
Hi,
I have a script below,which reads dates from No_weekandMonthend_dates.txt performs the copy operation.
for i in `cat /tmp/No_weekandMonthend_dates.txt`
do
cd $Gerenimopath/ZH_LP
find . -type f -name "$i_*.txt" -exec cp {} /home/gaddamja/TempLocal \;
cd... (2 Replies)
I have written the following script to update some Debian boxes.
#!/bin/bash
mxg_hosts_file="/etc/mxg/ssh-hosts"
while read line ; do
mxg_host="$(echo ${line} | awk -F":" '{print $1}')"
mxg_port="$(echo ${line} | awk -F":" '{print $2}')"
echo "Connecting and Upgrading... (3 Replies)
Hi All,
I want to search only files more than 60 min in particular directory but not in sub directories.
with this command i am getting even sub directires also.Please and let me know how to get the files.
$i=`find /home/n1013141/vijay -type f -mmin -60`;
print $i;
... (6 Replies)
I solved my issue by using the following code
#!/bin/bash
function GET_STATUS {
#values Active Passive Failed
ssh -a localhost '/home/user/fakecommand.sh'
}
STATE="unknown"
until ]
do
echo $STATE
sleep 5
STATUS=`GET_STATUS`
echo $STATUS | grep Active &&... (1 Reply)
Hi experts,
I am not sure in which forum to submit this question. If this is not the correct place then please let me know where to submit this thread.
My requirement is to invoke windows batch scripts from linux shell script. Hence, I have installed openssh in Cygwin on the windows machine.... (2 Replies)
Discussion started by: ahmedwaseem2000
2 Replies
LEARN ABOUT X11R4
ssh-argv0
SSH-ARGV0(1) BSD General Commands Manual SSH-ARGV0(1)NAME
ssh-argv0 -- replaces the old ssh command-name as hostname handling
SYNOPSIS
hostname | user@hostname [-l login_name] [command]
hostname | user@hostname [-afgknqstvxACNTX1246] [-b bind_address] [-c cipher_spec] [-e escape_char] [-i identity_file] [-l login_name]
[-m mac_spec] [-o option] [-p port] [-F configfile] [-L port:host:hostport] [-R port:host:hostport] [-D port] [command]
DESCRIPTION
ssh-argv0 replaces the old ssh command-name as hostname handling. If you link to this script with a hostname then executing the link is
equivalent to having executed ssh with that hostname as an argument. All other arguments are passed to ssh and will be processed normally.
OPTIONS
See ssh(1).
FILES
See ssh(1).
AUTHORS
OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0. Jonathan Amery wrote this ssh-argv0 script and the associated documentation.
SEE ALSO ssh(1)Debian Project September 7, 2001 Debian Project