Frequently Asked Question
In a high-performance computing (HPC) environment, effectively managing files and interacting with repositories is crucial. Commands like wget
, curl
, and git
are commonly used for downloading files and source code from the remote repositories.
Important: These commands can only be executed from the login nodes of Aziz supercomputer where the internet access is limited only to the login nodes.
This guide provides an overview of each command, its purpose, and examples to help you use them efficiently.
1. wget
wget
is a powerful command-line tool used to download files from the internet. It supports HTTP, HTTPS, and FTP protocols, making it versatile for various types of file retrieval.
Usage:
wget [options] [URL]
Example:
To download a compressed file from a specific URL:
wget https://example.com/file.tar.gz
Features:
- Supports downloading files recursively from web directories.
- Allows resuming partially downloaded files.
- Works in the background without requiring an active terminal session.
2. curl
curl
is a flexible command-line tool for transferring data to and from servers. It supports multiple protocols such as HTTP, HTTPS, FTP, and more. Unlike wget
, curl
is more feature-rich for interacting with APIs and performing data transfers beyond just downloading files.
Usage:
curl [options] [URL]
Example:
To download a file using curl
and save it with a specific name:
curl -o file.tar.gz https://example.com/file.tar.gz
Features:
- Supports URL-based transfers with customizable options.
- Allows interaction with APIs through HTTP methods like GET, POST, PUT, etc.
- Flexible with handling headers, cookies, and authentication.
- Suitable for both downloading files and uploading data.
3. git
git
is a widely-used version control system that helps developers track changes in source code, collaborate on projects, and manage versions of software efficiently. It is essential for team-based software development and open-source projects.
Usage:
git clone [repository URL]
Example:
To clone a Git repository from GitHub:
git clone https://github.com/user/repository.git
Features:
- Tracks code changes and maintains a complete history of the project.
- Facilitates collaboration through branches and pull requests.
- Integrates seamlessly with platforms like GitHub and GitLab.