📑
Chris Johnson's KB
  • Chris Johnson's KB
  • Meta
    • Pages to Add
  • Cheat Sheets
    • Apache
    • Docker
    • Gatsby
    • Git
    • GraphQL
    • iOS
    • MySQL
    • Nginx
    • NextJS
    • NodeJS
    • Rails
    • React
    • Security Tools
    • Shell (Linux)
    • SwiftUI
    • Ubuntu Server
    • Vim
  • Computing
    • Mac
    • iOS
    • ChromeOS
    • Windows
    • Browser Plugins
    • RSI Prevention
    • Voice Control
    • AWS Cloud 9
    • Visual Studio Code
    • Linux
  • Workflows
    • Podcasting
    • Setting up a new Mac
    • Site Deploys
  • Hardware
    • Dell U2720Q Monitor
    • Moonlander Keyboard
    • Apple Silicon Macs
  • Productivity
    • Structure
    • Nuggets of Wisdom
  • Coffee
    • Coffee Notes & Equipment
    • Coffee Beans
    • AeroPress Recipes
    • V60 Recipes
    • Moka Pot Recipes
    • French Press Recipes
  • Gaming
    • Rocket League
  • Food
    • Cocktails
    • Favorite Recipes
    • Whisky Reviews
    • Infinity Bottle
    • Favorite Wines
  • Inspiration
    • Quotes
  • Philosophy
    • Life
    • Programming
  • Fitness
    • Diets
    • Exercise Notes
    • Personal Training Notes
Powered by GitBook
On this page
  • Shell Cheat Sheet
  • File & Folder Operations
  • CURL
  • Zipping & Uzipping
  • Processes
  • Permissions

Was this helpful?

  1. Cheat Sheets

Shell (Linux)

Shell Cheat Sheet

File & Folder Operations

Delete a directory:rm -r directory

Delete file:rm FILETODELETE

New directory:mkdir FOLDERNAME

Copy file:cp SOURCE DEST

Copy folder:cp -avr SOURCE DEST

Watch file:less +F YOUR.LOG

Move/Rename folder:mv OLD NEW

CURL

Download file:curl -O URLHERE

Zipping & Uzipping

Unzip:unzip FILENAME.ZIP

Untar & Gzip:tar -xzf FILENAME.TAR.GZ

Ungzip: gzip -d FILENAME.GZ

Zip folder:zip -er DESTINATION.ZIP FOLDER

Processes

Kill process:kill -9 PROCESSID

Kill process on port: kill $(lsof -t -i:PORT_HERE)

Find process:ps -ef | grep PROCESS NAME

Process list:ps aux

Root process list:ps -u root

Check memory usage in megabytes:free -m

List of ports in use: sudo lsof -i -P -n

Permissions

PreviousSecurity ToolsNextSwiftUI

Last updated 2 years ago

Was this helpful?

Set all new files and folders to: $ chmod -R g+s somefolder

inherit the group of the current folder