![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| gcc-3.4.4 build on solaris 10 failing please help | mobydick | UNIX for Dummies Questions & Answers | 0 | 03-07-2008 05:04 AM |
| umount is failing | suntac | SUN Solaris | 3 | 04-06-2007 04:45 AM |
| sscanf function is failing | jxh461 | High Level Programming | 0 | 02-13-2007 11:10 PM |
| dd command failing | emsecrist | HP-UX | 4 | 05-13-2005 01:39 PM |
| FTP login failing | zbis12 | UNIX for Dummies Questions & Answers | 3 | 05-24-2002 11:01 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
ssh - rm failing
Hi,
Please help me... I am creating a string of filenames with absolute path and deleting those files situated in the remote server using ssh .. but it doesnot work.. Can anyone help me... here is my code for FileName in ${myDire} do Tmp=`basename $FileName` DelFiles="${DelFiles} "${SourceDirectory}/${Tmp} done #DelFiles contain files to be deleted with abolute path ssh USer/Pwd@Domain echo ${DelFiles} | xargs rm This statement gives 0 as the return value , but not deleting any of those files Thanks in advance Shihab Last edited by shihabvk; 09-29-2005 at 07:39 AM.. |
|
|||||
|
If you have to supply full path, that is because the PATH variable does not have the required directories. Try running the following command:
Code:
ssh user@domain echo $PATH |
|
||||
|
Quote:
an I am able to execute the same command without absolute path from the server Quote:
so the final command is like this ssh USer/Pwd@Domain echo ${DelFiles} \| /bin/xargs -n 20 /bin/rm Shihab |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|