Linux and macOS Terminal CLI Auto Upload

Introducing our FileLu script, designed for those who enjoy using the command line on Linux and macOS. This script simplifies the process of automating file uploads and backups from your Linux or macOS computer to your FileLu account. If you like working with the terminal and commands, you're in luck – our script can be easily installed and operated right from your Linux or macOS command line. Enjoy the convenience of CLI-powered auto uploads and backups, making it easy to secure your data. Additionally, this script is compatible with Raspberry Pi and other IoT devices, providing flexibility in your data management strategies. If you face any challenges or have questions, please don't hesitate to reach out to us.



Install FileLu terminal CLI auto upload for Linux / macOS
Note:: To ensure smooth functionality of the Linux CLI auto upload script, please ensure that your API key is enabled. You can locate your API key by navigating to the following link: https://filelu.com/account, then proceed to the API Key section and switch it ON.

REQUIREMENTS

curl | tar | jq
For Debian/Ubuntu: sudo apt-get update sudo apt-get install jq curl tar For CentOS/RHEL: sudo yum install jq curl tar For Fedora: sudo dnf install jq curl tar For Raspberry Pi: sudo apt install jq curl tar For openSUSE: sudo zypper install jq curl tar For macOS (install brew if needed https://brew.sh/): brew install jq curl tar

Copy and paste this in the terminal:

For Linux:
curl -o filelu.tar https://filelu.com/tools/filelu.tar sudo tar -xvf filelu.tar cd filelu chmod +x install_filelu.sh ./install_filelu.sh
For macOS:
curl -o filelu_mac.tar https://filelu.com/tools/filelu_mac.tar sudo tar -xvf filelu_mac.tar mv filelu_mac /Applications/filelu_mac cd /Applications/filelu_mac chmod +x install_filelu.sh ./install_filelu.sh

Enter your API key:

Get your API key in My Acount page
Enter your API key:

Enter remote folder name on FileLu you want to upload to:

If you don't see any folder you can create new folder in My Files
Available Folders - fld_id: Sample_folder - xxxxxx Sample_folder_2 - xxxxxxxx Enter the remote target folder name:

Enter the path to the local folder you want to upload (multiple folder support):

e.g: /path/to/backup

For Linux, if the installation is successful, you will see something like this:

filelu.service - FileLu Upload Script Service Loaded: loaded (/etc/systemd/system/filelu.service; enabled; vendor preset: > Active: active (running) since Wed 2023-10-04 21:28:38 EDT; 3h 28min ago Main PID: 1144589 (filelu.sh) Memory: 1.9M Press Enter to continue or Ctrl+C to exit.

Finally, apply all changes with this command :

For Linux:
source ~/.bashrc
For macOS:
source ~/.zshrc

Done! Now you will be able to auto-upload and backup files from your Linux computer to your FileLu account.

Usage / Help:

You can run: filelu or filelu.sh
e.g: filelu help
e.g: filelu ls files
e.g: filelu upload -f /path/to/file

help Show this help menu
ls files List uploaded files
ls folders List all folders
ls deleted List deleted files
upload -f /path/to/file to upload a single file e.g. filelu upload -f /path/file.zip
upload -dir /path/to/folder to add folder to folder_paths.txt e.g. filelu upload -dir /home/upload
upload -url remote_URL to upload from a remote URL e.g. filelu upload -url http://example.com/file.zip
rm file_code to remove a file
rm -dir /path/to/folder to remove a folder path from folder_paths.txt
mk dir Creates a new folder on the remote server. e.g filelu mk dir "folder name"
restore file_code to restore a file
clone file_code to clone a file
download file_code -to /path/to/local/dir to download a file
set file_code,folder_id to set a file’s folder
onlyme file_code,0|1 to toggle sharing (0 = public, 1 = private)
update Check and apply updates

FileLu Script Command Line Options and Usage

Help

Command: help

Description: Displays the help menu with all available commands and their usage.

Example: filelu help

List Files

Command: ls files

Description: Lists all uploaded files.

Example: filelu ls files

List Folders

Command: ls folders

Description: Lists all folders on FileLu.

Example: filelu ls folders

List Deleted Files

Command: ls deleted

Description: Lists files that have been deleted.

Example: filelu ls deleted

Upload a Single File

Command: upload -f /path/to/file

Description: Uploads a single file to FileLu.

Example: filelu upload -f /home/user/file.txt

Upload a Folder

Command: upload -dir /path/to/folder

Description: Adds a folder to folder_paths.txt for monitoring and uploads.

Example: filelu upload -dir /home/user/folder

Upload from Remote URL

Command: upload -url remote_URL

Description: Uploads a file from a remote URL.

Example: filelu upload -url http://example.com/file.zip

Remove a File

Command: rm file_code

Description: Removes a file using its file code.

Example: filelu rm abc123

Remove a Folder Path

Command: rm -dir /path/to/folder

Description: Removes a folder path from folder_paths.txt.

Example: filelu rm -dir /home/user/folder

Create a New Remote Folder

Command: mk dir foldername

Description: Creates a new folder on the remote server under the root directory.

Example: filelu mk dir MyNewFolder or filelu mk dir "Folder Name With Space"

Restore a File

Command: restore file_code

Description: Restores a file using its file code.

Example: filelu restore abc123

Clone a File

Command: clone file_code

Description: Creates a clone of a file using its file code.

Example: filelu clone abc123

Download a File

Command: download file_code -to /path/to/local/dir

Description: Downloads a file and saves it to the specified directory.

Example: filelu download abc123 -to /home/user/downloads

Set a File's Folder

Command: set file_code,folder_id

Description: Sets a file's folder using its file code and folder ID.

Example: filelu set abc123,567

Toggle Sharing

Command: onlyme file_code,0|1

Description: Toggles sharing for a file (0 = public, 1 = private).

Example: filelu onlyme abc123,1

Check for Updates

Command: update

Description: Checks for available updates for the FileLu script.

Example: filelu update





Need Help?