Sponsored Content
Top Forums Shell Programming and Scripting Lftp sftp get - script renames the local file with suffix tilde Post 302929559 by vhegde1011 on Monday 22nd of December 2014 06:01:25 PM
Old 12-22-2014
Thanks.
As per Man page, xfer:make-backup (boolean) : when true, lftp renames pre-existing file adding ‘~’ suffix instead of overwriting it.
Default value for above variable is ‘yes’. So before executing the get command disable the backup option for the current session.

Code:
lftp sftp://$USER:$PASS@$HOST:10022 -e "set xfer:make-backup no; get $REMOTE_FILE; bye"

It worked.

Last edited by rbatte1; 06-15-2017 at 07:00 AM.. Reason: Added CODE tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replacing commas with tilde in csv file.

hello all, i have a comma delimited file. i want to replace the commas in the file with the tilde symbol using sed. how can i do this? thanks. (4 Replies)
Discussion started by: femig
4 Replies

2. Shell Programming and Scripting

how to extract a tilde delimited file in unix

i have a file in unix in which datas are like this 07 01 abc data entry Z3 data entry ASSISTANT Z3 39 08 01 POD peadiatrist Z4 POD PeDIATRY Z4 67 01 operator specialist 00 operator UNSPECIFIED A0 00 ... (12 Replies)
Discussion started by: trichyselva
12 Replies

3. Shell Programming and Scripting

Delete Duplicate records from a tilde delimited file

Hi All, I want to delete duplicate records from a tilde delimited file. Criteria is considering the first 2 fields, the combination of which has to be unique, below is a sample of records in the input file 1620000010338~2446694087~0~20061130220000~A00BCC1CT... (5 Replies)
Discussion started by: irshadm
5 Replies

4. UNIX for Dummies Questions & Answers

File renames with timestamp urgent

Hi Gurus, I am novice in unix. I had a requirement where i should get the file when it is loaded in a folder & append time stamp to it & relace that file with timestamp. i.e., Suppose i have a file in home/input folder as abc.xml I want to get that file & rename it as... (4 Replies)
Discussion started by: pssandeep
4 Replies

5. UNIX for Advanced & Expert Users

lftp: Option to lftp a file, wait and download a file as soon as its created

Please let me know what is lftp options combination to wait and download a file from target as soon as its gets created. I tried with different options but not able to get it working as I need any help would be appreciated (4 Replies)
Discussion started by: bmkux
4 Replies

6. Shell Programming and Scripting

I need a korn shell script that renames and copies

I have 68 servers whose /etc/ntp.conf file have the wrong NTP server name and they need to be updated with a different or correct NTP server name. I am doing this on AIX Here is what I would like. and I would need a script that would rename the old /etc/ntp.conf and add a date stamp to it ... (1 Reply)
Discussion started by: jesifra
1 Replies

7. Shell Programming and Scripting

lftp script to connect to external sftp site and download to internal ftp and then send email

Hi there, I'm new to shell scripting and need some help if possible? I need to create a shell script (.sh) to run as a cron job on an ubuntu linux server to connect to an external sftp sites directory using credentials (which I have) and then download to our internal ftp server and then copy... (3 Replies)
Discussion started by: ghath
3 Replies

8. Solaris

Script to get files from remote server to local server through sftp without prompting for password

Hi, I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script. Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies

9. UNIX for Dummies Questions & Answers

Transfer image file from local to remote with sftp

Hi. I have managed to transfer a file from remote to my raspberry pi, but I have the camera mounted on the Raspbien so I would like to transfer the image the other way. I use this line: sshpass -p 'PASSWORD' scp -- USER@ssh.servername.com:/www/cam/image.jpg /home/pi/shared/web/image.jpg (4 Replies)
Discussion started by: brickglow
4 Replies

10. Shell Programming and Scripting

lftp is not working.how to replace lftp with expect utility using same .cfg file.

We have lftp command inside shell file. which is intern calling .cfg file for transferring the file from one server to other. Below command to not working. lftp -e "set net:max-retries 1; set net:reconnect-interval-base 1; put -E -O /destinationdir/inbox/ /sourcedir/test.txt; bye" -u... (4 Replies)
Discussion started by: johnsnow
4 Replies
pilot-xfer(1)						      General Commands Manual						     pilot-xfer(1)

NAME
pilot-xfer - backup, sync, and restore databases from a Palm handheld device, such as those made from Palm, Handspring, Handera, TRGPro, Sony or other Palm Compatible Handheld PDA device SYNOPSIS
pilot-xfer -p <port> [ --exclude file] --backup | --update | --sync directory ] or pilot-xfer -p <port> [ --restore directory | --list | --Listall | --Purge | --fetch dbname ... | --delete dbname ... | --install file ... | --merge file ... ] ... (Note that some options are not shown above and short option aliases are excluded for brevity. Please use pilot-xfer --help to get the full list of available options) DESCRIPTION
pilot-xfer allows the user to install databases contained in the standard .prc, .pdb, and .pqa formats onto a Palm, retrieve databases from the Palm, list the databases contained in a Palm, and backup or restore all of the databases at once. TARGET DEVICE
The default serial device used to communicate with a Palm is /dev/pilot. If the environment variable $PILOTPORT is set, its value will override the default. A serial device specified on the command-line will be used regardless of any $PILOTPORT setting. OPTIONS
Many options exist, including... -a dir, Archives files which have been removed from the Palm to dir instead of just deleting (unlinking) them -b dir, --backup dir Backs up the Palm into the specified directory (which will be created if it does not already exist). This operation must be speci- fied after any exclude option. -c --count Counts the files as they go by, but shunts the displaying of the "Skipping file..." messages -d dbname [...], --delete dbname [...] Delete the specified database(s) by name (without extension). Obviously, be very careful with this one. -e file, --exclude file Reads a list of databases from file. Prevents --backup, --sync, or --update from operating on the listed database(s). This option must be specified before the --backup, --sync, or --update operation whose action it modifies. -f dbname [...], --fetch dbname [...] Fetch each specified database out of the Palm into the current directory. -F Modifies the behavior of --backup, --sync, and --update to back up non-OS databases which have been stored in FlashROM -h, --help Displays a summary list of pilot-xfer's usage and exits. -i file [...], --install file [...] Install each specified file into the Palm. Wildcards are valid with this syntax. -l, --list List the databases in the Palm, excluding OS-specific databases. -L, --Listall List all of the databases on the Palm, including OS-specific native databases. -m file [...], --merge file [...] Adds the records in each specified file into the corresponding Palm database. -O Modifies the behavior of --backup, --sync, and --update to back up OS databases which are stored in FlashROM -P, --Purge Purge any deleted data that hasn't been cleaned up by a sync (this is a safe operation, and will prevent your Palm from accumulating crud if you delete records but aren't syncing with a PIM.) The only information you can lose is archived but un-synced records. -q, --quiet Causes pilot-xfer to be quiet and not display the "Skipping file..." messages -r dir, --restore dir Installs all files contained in a directory into the Palm. (Use this to restore your Palm after a hard reset has cleared its mem- ory, using your backup directory as a baseline.) -s dir, --sync dir Backs up the Palm into the specified directory (which will be created if it does not already exist). Any Palm databases which have not been modified or created since the versions stored in the specified directory will not be backed up. NOTE: Any Palm databases which have been deleted will have their corresponding backup file removed. This operation must be speci- fied after any exclude option. -u dir, --update dir Backs up the Palm into the specified directory (which will be created if it does not already exist). Any Palm databases which have not been modified or created since the versions stored in the specified directory will not be backed up. This operation must be specified after any exclude option. -U This will back up the UnsavedPreferences.pdb file from the Palm. Normally this file is not backed up by normal means (Palm Computing recommends that you do not restore this file upon restoration of your device using --restore This also modifies the behavior of --backup --sync and --update -v, --version Displays the version of pilot-link from which this program was installed and exits. USAGE
The program will connect to a target Palm handheld device and port, prompt the user to hit HotSync, and perform the requested options spec- ified by the user on the commandline. EXAMPLES
To backup a Palm: # long options pilot-xfer --port /dev/pilot --backup /home/pilot/Backup or # over IrDA, using short options pilot-xfer -p /dev/irnine -b /home/pilot/Backup To restore that backup to a non-standard serial port (for example, to a xcopilot or POSE session, assuming you have xcopilot or POSE con- figured properly for this operation, see the appropriate man pages for details on configuring your emulator): pilot-xfer -p /dev/ttyqe --restore /home/pilot/Backup SEE ALSO
pilot-link(7) . KNOWN BUGS
Unable detect when the Palm handheld is full when installing files. It will proceed as if successful though may not actually install the files. Unable to detect if the local files/directory are writable when fetching or backing up from the Palm device, or if the target drive/parti- tion is full. REPORTING BUGS
Report bugs at http://bugs.pilot-link.org/ AUTHOR
pilot-xfer written by Kenneth Albanowski. This manual page was originally written by Kenneth Albanowski and David H. Silber. Completely rewritten by David A. Desrosiers for pilot-link 0.10 and later revisions. Free Software Foundation Palm Computing Device Tools pilot-xfer(1)
All times are GMT -4. The time now is 02:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy