Etiquetes » Bash

mega.nz direct download from command line

Found somewhere:

#!/bin/bash
# Updated by Derek "Cyph3r"
# Syntax ./mega.sh
url=$1

# get id and key from url
id=`echo $url | awk -F '!' '{print $2}'` 250 more words

Useful Commands

sort -k

TIL, when you call sort -k3, you’re not just sorting by the third field, but by whatever the value between the third field up to the end of the line… 261 more words

Everyday

How to get number of status messages of a Nginx reverse proxy or web server?

It is important to know the number of status messages of a Nginx reverse proxy or web server. Especially those of 301 and 404. By following these numbers, you may have information about the traffic which arrives at your server, and you may take action according to these numbers. 70 more words

Linux

while do read done in one line

This is a simple but useful loop to process an input file if none can be provide with a command option for a certain program. E.g. 165 more words

OpenSuSE Tumbleweed - testing the password of any user with getent and openssl

For one of my VMs I forgot to note which of the initial password I had changed, so I wanted to check them.

Since I didn’t have a keyboard attached to the console and ssh wasn’t allowing root, I needed an alternative than actual login to test the passwords. 390 more words

Development

download with youtube-dl

For downloading a YouTube playlist, or for downloading all the videos of a YouTube user, I use this script:

URL="https://..."    # youtube user / playlist

youtube-dl --ignore-errors --download-archive downloaded.txt -f 22 "$URL"
… 36 more words
Bash