- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: trying to do a 'mv' command with ssh in batch
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 04:09 AM
11-22-2005 04:09 AM
trying to do a 'mv' command with ssh in batch
ssh idrobmr5@dc2c8w "mv /datastore/data/obmtestbst/reports/idr/sftp/out/* /datastore/data/obmtestbst/reports/idr/sftp"
I get the following: mv /datastore/data/obmtestbst/reports/idr/sftp/out/* /datastore/data/obmtestbst/reports/idr/sftp: not found
Yet files are there. This is run in a script within a if then statement. if I run the same command outside the if..then it works?
what am I missing?
- Tags:
- ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 04:20 AM
11-22-2005 04:20 AM
Re: trying to do a 'mv' command with ssh in batch
ssh idrobmr5@dc2c8w "/usr/bin/mv /datastore/data/obmtestbst/reports/idr/sftp/out/* /datastore/data/obmtestbst/reports/idr/sftp"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 04:31 AM
11-22-2005 04:31 AM
Re: trying to do a 'mv' command with ssh in batch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 04:38 AM
11-22-2005 04:38 AM
Re: trying to do a 'mv' command with ssh in batch
. ~/.profile
This may get enough of an environment to make this work.
Or set the PATH variable to at least include the current location of the mv command.
As far as I know not found means one thing. Can't find the command dude!!!!
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 05:45 AM
11-22-2005 05:45 AM
Re: trying to do a 'mv' command with ssh in batch
I have the mv dir already set up in PATH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 06:24 AM
11-22-2005 06:24 AM
Re: trying to do a 'mv' command with ssh in batch
how exactly is the above command executed? can you cut/paste snippets from the script... etc?
also, to help troubleshoot... what happens if you replace "mv" with something like an "ls -l"? Does it change to "ls -l /from/path/* /to/path: not found"?
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 07:07 AM
11-22-2005 07:07 AM
Re: trying to do a 'mv' command with ssh in batch
Basically this script is to perform two task, the first one is to sftp a string of files to the target server on the directory ending with /out, that is done without any problem. The second step is once the files have been sftp'ed they then have to be moved one up on the tree so that the process that will treat those files will have a complete file and not a file in transfer. Attach is a copy of the script
If I take the result of the move (variable resolve) and execute it outside the script (ie: ssh blablabla) is works