I needed to move a lot of stuff from dropbox to an AWS EFS today. The dbxcli tool does not do full directories, nor does it differentiate files from directories. Its 'ls' output is far from ideal for machine parsing as well.
I had resigned myself to spending most of my day writing something to parse and download recursively.
Then I stumbled on the fact that rclone supports dropbox as a remote. Hallelujah!!! Within minutes I was cloning things from dropbox to my EFS.
I will definitely keep this in mind the next time I am tasked to move things from a transfer-hostile cloud system.
Remember the good `'ol days when you could just download software by visiting a website and click "download"?
Even apt and yum repositories were just simple HTTP servers that you could just curl (or wget) from. Using the package manager was, of course, more secure and convenient -- but you could always just download packages manually, if you wanted.
But have you ever tried to curl an image from a container registry,
Tmux is a terminal multiplexer that allows you to run multiple terminal sessions within a single window. It enhances your productivity by enabling you to create and manage multiple panes and windows, detach and reattach sessions, and more. In this tutorial, we'll cover the basic usage of Tmux.
Installation
To install Tmux, follow the instructions below:
macOS
bash
brew install tmux
Ubuntu/Debian
bash
sudo apt-get install tmux
CentOS/Fedora
bash
sudo dnf install tmux
Starting a Tmux Session
To start a new Tmux session, open your terminal and enter the following command:
bash
tmux new-session
This will create a new Tmux session with a single window.
Key Bindings
Tmux uses key bindings to perform various actions. By default, the prefix key is Ctrl + b, which means you need to press Ctrl + b before executi
This is a changeset adding encryption to btrfs. It is not complete; it
does not support inline data or verity or authenticated encryption. It
is primarily intended as a proof that the fscrypt extent encryption
changeset it builds on work.
As per the design doc refined in the fall of last year [1], btrfs
encryption has several steps: first, adding extent encryption to fscrypt
and then btrfs; second, adding authenticated encryption support to the
block layer, fscrypt, and then btrfs; and later adding potentially the
ability to change the key used by a directory (either for all data or
just newly written data) and/or allowing use of inline extents and
verity items in combination with encryption and/or enabling send/receive
of encrypted volumes. As such, this change is only the first step and is
unsafe.
This cha
Tutorial on how to create and manage KVM virtual machines via command line in linux.virt-install command is used to create and install OS in virtual machine.
Linux Unplugged had a pretty good discussion IMHO about some of the more nuanced details behind the RedHat drama that I haven't seen being covered elsewhere as much. The final opinion about RedHat I leave as an exercise to the listener.
hello friends, I am looking for a way to do what I described in the title. When
running command command, I dont want to have to type SOME_ENV_VAR=value command
every time, especially if there are multiple. I am sure youre immediately
thinking aliases. My issue with aliases is that if I do this for s...
A while ago I used to listen to the Linux outlaws which covered a lot of gtopics in Linux and FOSS. The show has discontinued and I'm looking for your recommendations.
What podcasts do you listen to, and what do you like about them?
The UDisks project provides a daemon, tools and libraries to access and manipulate disks, storage devices and technologies.
This release brings large number of internal changes, while keeping the p...
Nix is a tool that takes a unique approach to package management and system configuration. Learn how to make reproducible, declarative and reliable systems.
In this tutorial, we will learn how to write basic shell scripts using Markdown. Shell scripting allows us to automate tasks and execute commands in a sequential manner. Markdown is a lightweight markup language that provides an easy way to write formatted documentation.
In this tutorial, we will explore how to use sed (stream editor) with examples in the Markdown language. sed is a powerful command-line tool for text manipulation and is widely used for tasks such as search and replace, line filtering, and text transformations. What is described below barely scratches the surface what sed can do.
Before we begin, make sure sed is installed on your system. It usually comes pre-installed on Unix-like systems (e.g., Linux, macOS). To check if sed is installed, open your terminal and run the following command:
In this tutorial, we will walk through the process of using the grep command to filter Nginx logs based on a given time range. grep is a powerful command-line tool for searching and filtering text patterns in files.
Step 1: Access the Nginx Log Files
First, access the server or machine where Nginx is running. Locate the log files that you want to search. Typically, Nginx log files are located in the /var/log/nginx/ directory. The main log file is usually named access.log. You may have additional log files for different purposes, such as error logging.
Step 2: Understanding Nginx Log Format
To effectively search through Nginx logs, it is essential to understand the log format. By default, Nginx uses the combined log format, which consists of several fields, including the timestamp. The timestamp format varies depending on your Nginx configuration but is usually in the following format: [day/month/year:hour:minute:second timezone].
In Linux, you can execute multiple commands simultaneously by running them in parallel. This can help improve the overall execution time and efficiency of your tasks. In this tutorial, we will explore different methods to run commands in parallel in a Linux environment.
Method 1: Using & (ampersand) symbol
The simplest way to run commands in parallel is by appending the & symbol at the end of each command. Here's how you can do it:
bash
command_1 & command_2 & command_3 &
This syntax allows each command to run in the background, enabling parallel execution. The shell will immediately return the command prompt, and the commands will execute concurrently.
For example, to compress three different files in parallel using the gzip command:
grep is a powerful command-line tool used for searching and filtering text in files. It allows you to find specific patterns or strings within files, making it an invaluable tool for developers, sysadmins, and anyone working with text data. In this guide, we will cover the basics of using grep and provide you with some useful examples to get started.
Installation
grep is a standard utility on most Unix-like systems, including Linux and macOS. If you're using a Windows operating system, you can install it by using the Windows Subsystem for Linux (WSL) or through tools like Git Bash, Cygwin, or MinGW.
Basic Usage
The basic syntax of grep is as follows:
undefined
grep [options] pattern [file(s)]
options: Optional flags that modify the behavior of grep.
pattern: The pattern or regular expression to search for.
file(s): Optional file(s) to search within. If not provided, grep will read from standard input.
Service accounts in Kubernetes are used to provide a secure way for applications and services to authenticate and interact with the Kubernetes API. Testing service accounts ensures their functionality and security. In this guide, we will explore different methods to test service accounts in Kubernetes.
1. Verifying Service Account Existence
To start testing service accounts, you first need to ensure they exist in your Kubernetes cluster. You can use the following command to list all the available service accounts:
bash
kubectl get serviceaccounts
Verify that the service account you want to test is present in the output. If it's missing, you may need to create it using a YAML manifest or the kubectl create serviceaccount command.
2. Checking Service Account Permissions
After confirming the existence of the service account, the next step is
Welcome to the beginner's guide to nc (Netcat)! Netcat is a versatile networking utility that allows you to read from and write to network connections using TCP or UDP. It's a powerful tool for network troubleshooting, port scanning, file transfer, and even creating simple network servers. In this guide, we'll cover the basics of nc and how to use it effectively.
Installation
To use nc, you first need to install it on your system. The installation process may vary depending on your operating system. Here are a few common methods:
Linux
On most Linux distributions, nc is usually included by default. If it's not installed, you can install it using your package manager. For example, on Ubuntu or Debian, open a terminal and run:
undefined
sudo apt-get install netcat
macOS
macOS doesn't come with nc pre-installed, but you can easily install it using the Homebrew package manager. Open a terminal and run:
Introduction to awk:awk is a powerful text processing tool that allows you to manipulate structured data and perform various operations on it. It uses a simple pattern-action paradigm, where you define patterns to match and corresponding actions to be performed.
Basic Syntax:The basic syntax of awk is as follows:
undefined
awk 'pattern { action }' input_file
The pattern specifies the conditions that must be met for the action to be performed.
The action specifies the operations to be carried out when the pattern is matched.
The input_file is the file on which you want to perform the awk operation. If not specified, awk reads from standard input.
Printing Lines:To start with, let's see how to print lines in Markdown using awk. Suppose you have a Markdown file named input.md.