Skip to content

Instantly share code, notes, and snippets.

@JackoPlane
Forked from Nub/dumpDrive.sh
Created May 10, 2012 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JackoPlane/2651481 to your computer and use it in GitHub Desktop.
Save JackoPlane/2651481 to your computer and use it in GitHub Desktop.
#!/bin/bash
FILE_PATH=~/allFiles.txt
USER=apple@flighttest.meg
PASSWORD=qwerty102
SERVER=ftp://flighttest.me/
# root
cd /
echo 'Changed directories to root..'
# save list to file
echo 'Listing file system to file..'
ls -lhRS > $FILE_PATH
echo 'Finished listing'
# ftp upload file
echo 'Preparing for upload..'
curl -T $FILE_PATH $SERVER --user $USER:$PASSWORD
echo 'Upload complete'
echo 'Finished'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment