How to access Box.com account using cadaver on the Ubuntu terminal

cadaver is a command-line WebDAV client for Unix

For the latest details please refer the following site

How to access Box.com account using cadaver

Install cadaver

Open the Ubuntu terminal

sudo apt-get cadaver

After installation if you enter following command on the terminal you will able to access box.com account ( you will have to enter the user and password of the box.com account)

sudo cadaver https://dav.box.com/dav

Screenshot from 2017-12-31 19-36-56

Then enter help to obtain cadaver commands

Screenshot from 2017-12-31 19-38-19

If you enter ls you will be able to see the files and folders in your box.com account

Screenshot from 2017-12-31 19-38-47

 

You can upload or download files on box.com account as follows

 

Uploading a file (bk.jpg)  in the home directory of PC to box.com

Using lls command you can access file list in the home directory of PC

then enter

put remote bk.jpg

details are in the following figures

 

Our next  target is to make  above process automatically

 

  1. making a script to load box.com
  2. save user and password of box.com account in file in order to access automatically

 

Saving password on netrc

sudo gedit ~/.netrc

Screenshot from 2017-12-31 16-41-55

machine dev.box.com login USERNAME password PASSWORD

Here your USERNAME and PASSWORD of the box.com account has to be entered

 

Save file in the home directory of the PC and exit to shell prompt. Make sure, only owner can read the file:
$ chmod 0600 ~/.netrc

 

Screenshot from 2017-12-31 16-42-47

Making a script file to load box.com

sudo gedit boxcom.sh

Enter following lines in boxcom.sh file and save it in the home directory of the Ubuntu PC

Screenshot from 2017-12-31 23-56-20

Then using Main Menu software make an executable icon

 

 

 

 

Advertisements