help uploading directories with SFTP


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers help uploading directories with SFTP
# 1  
Old 03-09-2009
help uploading directories with SFTP

Hi, I am a newbie and not really familiar with commands, I have searched the forum, but there was only one thread. That thread suggested compressing it and then decompressing it. So I am wondering, what format do I compress it to, and how do I decompress it once I uploaded it from within SFTP (specifically what commands...). If anyone knows a simpler way to upload entire directories via SFTP, feel free to share.
# 2  
Old 03-10-2009
Afaik there is no way to recursively copy directories via sftp with the normal command line client.
So you might either do as suggested in that other thread, using for example gzip with the -r switch for recursive operation and gunzip to uncompress it. There are other compression tools like bzip2/bunzip2.
Not all of them have an option for operating recursively on directories so a common way is to tar them 1st, and then compress.

It implies of course that you have a possibility on the recipient side where you upload your data, to uncompress and/or un'tar there.

The most simple way might be a graphical interface like for example Servant Salamander which can use many different protocols including sftp (if this is an option for you). The advantage is that you dont have to worry about de-/compressing and stuff, since it just scans your local directory structure you want to submit and just creates it accordingly on the recipient side.
# 3  
Old 03-10-2009
why don't you use Winscp. it has sftp and you don't need to worry about compressing/decompressing anything. Just upload the directory or anything inside it.
# 4  
Old 03-11-2009
milhan: Winscp crashes on me.

zaxxon: Servant Salamander is not free.

thanks for all your help guys, I got it solved now. Discovered scp...Smilie
# 5  
Old 03-11-2009
Exactly, I was going to offer scp - as simple as : scp -r folder user@server:path
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

Uploading files via php

I used the following code, which I found on the internet to upload files. <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="upload2.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input... (2 Replies)
Discussion started by: jgt
2 Replies

2. Shell Programming and Scripting

Copy Directories with Files from One Server to Other using sftp

Hi, I have a requirement where I have to connect to another server and copy directories from one server to another Directories on the Source server look like below (YYYY-MM-DD- 1 to 23) drwxr-xr-x 2 test_user dmfmart 422 Sep 1 23:45 2014-09-01-18drwxr-xr-x 2 test_user dmfmart ... (1 Reply)
Discussion started by: arunkesi
1 Replies

3. Shell Programming and Scripting

Uploading using sftp file1 copied to file2

Hi All, i am using hp-ux server and doing mput command for uploading the multiple files. below is the code sftp hfjr@usilehrttlsd01.com cd /home/sftp_dir mput kk1 kk2 i am getting Uploading kk1 to /home/sftp_dir/kk2. problem is i am getting kk2 file only not kk1 file. when i am... (13 Replies)
Discussion started by: krupasindhu18
13 Replies

4. UNIX for Advanced & Expert Users

SFTP Resticting Only Uploading Of A File

I have setup our SFTP server: SFTP Setup: /etc/ssh/sshd_config: Subsystem sftp internal-sftp Match Group sftpusers PasswordAuthentication yes ChrootDirectory /srv/sftponly AllowTCPForwarding no X11Forwarding no ForceCommand internal-sftp Adding the... (5 Replies)
Discussion started by: metallica1973
5 Replies

5. Shell Programming and Scripting

Help with SFTP on directories

Hi Junta, please help me with SFTP on remote directories. i want to get the latest generated directory and its contents from remote machine to local host using SFTP. is there any possible way to achive this?? please help me. i feel its a bottle neck for me:(:( (1 Reply)
Discussion started by: mahi_mayu069
1 Replies

6. UNIX for Dummies Questions & Answers

Moving files between directories using SFTP

I want to connect to an SFTP server, GET some files, then move those files to a different directory on the SFTP server so I don't try to GET them next time. But there doesn't seem to be a way to move files between directories on the remote server from SFTP. I missing something obvious? And if... (6 Replies)
Discussion started by: cjhancock
6 Replies

7. Shell Programming and Scripting

Issue in uploading file using sftp

Hi I'm using this script to upload a file from local system to sftp server. But in the log file i'm getting an error "Error during upload" Can you please help me out ... ### CONFIGURATION LOCAL_DIR=/abc/out FILE_MASK="File*.txt" LOG_DIR=/abc/error/File_`date "+%Y%m%d%H%M%S"`.LOG... (3 Replies)
Discussion started by: Jaychandra
3 Replies

8. Shell Programming and Scripting

uploading directories via SFTP

Hello All, Is there a way to upload whole directories to a machine using sftp (scp is not an option)? I have to use sftp because the machine that I am connecting to only has SFTP abilities (uploading from a linux box to a windows box). Currently I am automating a copy however right now I am... (2 Replies)
Discussion started by: mab623
2 Replies

9. UNIX for Advanced & Expert Users

Perl Uploading Files

Using perl 5.8.0, Linux 2.4.20-30.9, RedHat 9.0. We have many .cgi's that allow privileged users to upload files to the server through a web browser. We've had these .cgi's for years and have never had any problems with them. Recently the files being uploaded are sometimes being given 600... (16 Replies)
Discussion started by: sstevens
16 Replies

10. UNIX for Dummies Questions & Answers

uploading

can i upload the file using telnet from my computer to the internet ... let me repeat ... using putty telnet :) and whats the command ?? (6 Replies)
Discussion started by: SeeD
6 Replies
Login or Register to Ask a Question