Skip to content

scakko84/oneliners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 

Repository files navigation

oneliners

A collection of terminal oneliners

Terminal

Replace spaces with dots in filenames recursively

find . -depth -name "* *" -execdir rename 's/ /./g' "{}" \;

Copies directory to remote path via scp

scp -r directory user@host:"'path/with spaces/'"

Delete all files matching multiple extensions recursively in directory

find . \( -name '*.zip' -or -name '*.txt' \) -delete

Write image file to usb device

dd if=file.img of=/dev/sdx bs=4M oflag=sync

cURL

Download from URL to file resuming from last interruption

curl -L -O -C - 'http://www.example.com/example.zip' -o example.zip

Wget

Download recursively from an URL all files of a given type to current directory

wget -r -np -nd -nc -A "*.zip" 'http://www.example.com/'

OpenSSL

Generate a pseudo-random password from secure random data

openssl rand -base64 32

Download a server certificate in DER format from an endpoint

openssl s_client -showcerts -servername www.example.com -connect www.example.com:443 < /dev/null | openssl x509 -outform DER > www.example.com.der

macOS

Convert iso file to img file

hdiutil convert -format UDRW target.iso -o target.img

About

A collection of terminal oneliners

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors