Terminal Commands

January 24, 2023

The terminal is an awesome tool. Below are some cool commands that you should use !

Find the password for a particular wifi network :

security find-generic-password -wa "SSID"

Copy the output of a command to your clipboard :

cat ~/.ssh/id_rsa | pbcopy

Change your password :

passwd

Current working directory (terminal)

pwd

Move a file :

mv file /Destination/Directory/

Copy a file :

cp file /Destination/Directory/

SSH copy :

scp file olivier@server:/Destination/Directory

SSH copy the content of a folder to a remote folder

scp -r /folder/. olivier@server:/Destinatin/Directory

How much space you have left on your disk(s)

df -h

Open anything :

open file

Open Finder for the current folder in your terminal :

open .

Your local ip address :

ifconfig en0 

or

ifconfig en0 | grep inet

Process using most memory :

top -o rsize

Compare two files :

diff file1 file2

Serve hugo, including drafts :

hugo serve -D

Profile picture

Written by Olivier Bonnet who lives and works in Montreal writing a blog that nobody reads 🤪...

© Bonneto 2024