Just need a folder of my own, that's all!
September 2, 2008 5:04 AM   Subscribe

Would anyone care to comment on the most practical way, given access to a command line Fedora box, I can obtain a copy of a folder and its contents?

The box is connected to the net but I don't know enough Unix to, for example, get a tar of the folder and have the machine email me a copy. Although thinking about it, the folder is probably just a little too big for that. I have SSH and physical access but FTP isn't working, which is the whole problem in a nutshell, really. If anyone is interested in 10 minutes' brainstorming feel free to mefi mail me!
posted by dance to Computers & Internet (7 answers total) 1 user marked this as a favorite
 
if you have SSH, then you should have at least one of SCP or SFTP. If you're downloading to a windows machine, then WinSCP (also, confusingly, does SFTP) is really simple to use - you can download it as a standalone executable, so don't even need an install.

If you're downloading to a linux machine, then:
scp username@server.com:/path/to/file .

will download the file.

If you want to tar up the folder-contents, rather than downloading directly then:
tar -zcf filename.tar.gz /path/to/folder

will create a compressed archive for you (it will create the tar in whichever directory you run the command from).
posted by gregjones at 5:11 AM on September 2, 2008


Add -r to scp if you're targeting a folder.

From the copied-to system:
scp -r user@host:/path/to/file /local/destination

or from the copied-from system:
scp -r /path/to/file user@local_ip:/local/destination
posted by moift at 5:14 AM on September 2, 2008 [1 favorite]


If you can ssh in, you can then (s)ftp out to some friendlier place you can upload your file to.
posted by ghost of a past number at 5:28 AM on September 2, 2008


If you really want an email, this might work:

ssh user@host -C "tar -c /path/to/directory -f /path/to/tarred-directory && metasend -f /path/to/tarred-directory -t recipient@address.com -s File -m application/x-tar -b && rm /path/to/tarred-directory"
posted by cmonkey at 5:45 AM on September 2, 2008


If you are transferring to another *nix machine, scp from the command line is the easiest. If you need to transfer to windows, and your windows machine is nearby, consider using winscp and initiating the transfer from the windows box.
posted by beerbajay at 5:57 AM on September 2, 2008


If you have physical access, plug in a USB drive and copy the folder? Easy if it automagically mounts it, otherwise you have to rootle around in /dev to find it.
posted by katrielalex at 6:34 AM on September 2, 2008


Response by poster: Thanks a lot!! WinSCP did the job where so many other clients failed.
posted by dance at 6:47 AM on September 2, 2008


« Older How do I create a SQL Server 2000 'View'...   |   What's the current state of thought regarding... Newer »
This thread is closed to new comments.