Commands

For macos Computer Commands

sudo [command]

Run command with the security privileges of the super user

nano [file]

Opens the Terminal editor

[command] -h

Get help about a command


cd [folder]

Change directory, e.g. cd Documents

ls -C

Force multi-column output of the listing

ls -S

Sort files or entries by size


du -sh [folder]

Human readable output of all files in a directory

mkdir <dir>

It is used to open the shared folder menu.

mkdir -p <dir>/<dir></dir>

Create nested folders


brew doctor

Check brew for potential problems

brew list

List all the installed formulas

brew search

Display available formulas for brewing


brew cask list

List all installed casks

/ (Forward Slash)

Top level directory

. (Single Period)

Current directory


~ (Tilde)

Home directory

afinfo

Audio File Info

airport

Manage Apple AirPort


awk

Find and Replace text within file(s)

basename

Convert a full pathname to just a filename

bash

Bourne-Again SHell


bind

Set or display readline key and function bindings •

break

Exit from a For, While, Until or Select loop •

builtin

Execute a shell builtin •


bzip2

Compress or decompress files

wuaucpl.cpl

It is used to open the auto update screen.

caffeinate

Prevent the system from sleeping


calendar

Reminder Service

cancel

Cancel print jobs

case

Conditionally perform a command •


command

Run a command (not a function) •

complete

Edit a command completion [word/pattern/list]

continue

Resume the next iteration of a loop •


cp

Copy one or more files to another location

cpio

Copy files to and from archives

dsenableroot

Enable root access


echo

Display text on screen •

enable

Enable and disable builtin shell commands •

env

List or Set environment variables


exec

Execute a command

execsnoop

Snoop new process execution

expand

Convert tabs to spaces


false

Do nothing, unsuccessfully

fc

Fix command (history)

file

Determine file type


Example

which command is used to create folders? :