Terminal Mac Flashcards
pwd
print working directory
cd
?
ROZKMINIC ZROBISZ FISZKI LISTA!
cd Home directory
cd [folder] Change directory, e.g. cd Documents
cd ~ Home directory
cd/ Root of the drive
cd - Previous directory or folder you last browsed
pwd Show your working directory
cd.. Move up to the parent directory
cd../.. Move up two levels
List Directory Contents
ls Display the name of files and subdirectories in the directory
ls -C Force multi-column output of the listing
ls -a List all entries including those with .(period) and ..(double period)
ls -1 Output the list of files in one entry per line format
ls -F Display a / (slash) immediately after each path that is a directory, * (asterisk) after executable programs or scripts, and @ after a symbolic link
ls -S Sort files or entries by size
ls -l List in a long format. Includes file mode, owner and group name, date and time file was modified, pathname, and more
ls -l / List of the file system from root with symbolic links
ls -lt List the files sorted by time modified (most recent first)
ls -lh Long listing with human readable file sizes in KB, MB, or GB
ls -lo List the file names with size, owner, and flags
ls -la List detailed directory contents, including hidden files
File Size and Disk Space
du List usage for each subdirectory and its contents
du -sh [folder] Human readable output of all files in a directory
du -s Display an entry for each specified file
du -sk* | sort -nr List files and folders, totaling the size including the subfolders. Replace sk* with sm* to list directories in MB
df -h Calculate your system’s free disk space
df -H Calculate free disk space in powers of 1,000 (as opposed to 1,024)