Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-22-2014, 12:17 PM   #1
LQ Newbie
Registered: Dec 2014
Posts: 1

Rep: Reputation: Disabled
lftp sftp get - command renames existing local file with suffix tilde

Below script used for sftp get,
lftp sftp://$USER:$PASS@$HOST:10022 -e "get $REMOTE_FILE; bye"

If file does not exist in sftp server, and file (same as remote file name) exists in local dir, above script throws error and renames local file with suffix ~.
For example: If file name is 'xyz_file' after script execution it throws error: get: Access failed: /xyz_file: Specified file path is invalid. and renames the local file to 'xyz_file~'
Any idea why its happening.
Old 12-22-2014, 07:50 PM   #2
Senior Member
Registered: Nov 2011
Distribution: Debian
Posts: 1,170

Rep: Reputation: 240Reputation: 240Reputation: 240
Do you work for Sony?

You've hard-coded all the security information into that little script...
Old 12-23-2014, 03:00 AM   #3
Senior Member
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
See man page of lftp

man lftp

search for xfer:make-backup option and change it as your liking in the configuration file of lftp.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Passwordless connection to sftp server using lftp aarelovich Linux - Software 5 03-25-2014 09:16 AM
Error dowloading with lftp from sftp server: get: Access failed: No such file dgerber Linux - Newbie 0 02-10-2013 04:47 AM
[SOLVED] How to make several "renames" by inoking a single command? Make a shell script file? Foxbat1155 Linux - Newbie 20 11-25-2011 09:13 AM
Error Configuration file /usr/local/centreon/ODS/etc/ not found. existing jsaravana87 Linux - Server 1 10-08-2011 10:39 AM
LXer: Modifying Existing Local Zone File Systems On Solaris 10 Unix LXer Syndicated Linux News 0 10-22-2008 02:20 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration