![]() ![]() | ![]() ![]() ![]() |
2. If your bash package has remote file access enhancement, you can perform copying, moving, removing and editing of remote files to which you have FTP access.
3. Operating remote access:
Note the % instead of usual @ in the
internet address - the change is due to bash own 'host completion' which
steals from us completing of a string containing @.
a) In order to copy a file into a remote location issue:
cp local-file /remote-user%remote-host:remote-path/remote-filenameb) In order to copy a file from a remote location issue:
cp /remote-user%remote-host:remote-path/remote-filename local-filec) In order to copy a file from a remote location issue:
cp /remote-user%remote-host:remote-path/remote-filename \ /remote-user2%remote-host2:remote-path2/remote-filename2d) In order to move a file into a remote location issue:
mv local-file /remote-user%remote-host:remote-path/remote-filenamee) In order to move a file from a remote location issue:
mv /remote-user%remote-host:remote-path/remote-filename local-filef) In order to move a file from a remote location issue:
mv /remote-user%remote-host:remote-path/remote-filename \ /remote-user2%remote-host2:remote-path2/remote-filename2g) In order to remove a file at a remote location issue:
rm /remote-user%remote-host:remote-path/remote-filenameh) In order to edit a remote file:
editor /remote-user%remote-host:remote-path/remote-filenameWhere editor is your favorite editor. Currently we support editing by vi, emacs and pico. See the source code, where you can add another editor to that list.
4. Tab completion. Tab completion for remote file and path names works only on anonymous FTP accesses. For using tab completion you should type the remote argument's username and hostname fully! :
cp local-filename /remote-user%remote-host: -------------------------------------------^Here or after typing some more letters you may press the tab key for completion.