Mark Voortman, Ph.D.
pkg install xorg
pkg install xfce
startxfce4
w
: Display logged in accountswho
: Who is logged in to this sessionwhoami
: User name onlylogname
: Logged in user namehostname
: Name of computerpwd
: Print working directory (shows where you are)df
: Display disk space statuscat
: Display content of a fileecho
: Echo back command line parametercd
: Change directory
ls
: List directory contentscp
: Copy filerm
: Remove filemv
: Move file (and rename)mkdir
: Create a directoryrmdir
: Remove a directoryls –R | less
ls –R | grep var | less
>
Send to>>
Send to append<
Input fromls > directories.txt
cat directories.txt
ls > /dev/null
less < directories.txt
kill XXX
- kill process XXX
by sending a
signal (SIGTERM
)kill -9 XXX
- force kill process XXX
by
sending a signal (SIGKILL
)man
command will display manual pagesapropos
command conducts searches
man –k
whatis
command synonym for apropos
vi
is default editoree
is generally considered much easier to use for most
peopledf -h
Present output in human readable formatdu -sh
Present output for every entry, human
readabledu -a /var | sort -nr | head -n 10
Display out for each
entry in /var, pipe it to sort, sort numeric in reverse order, pipe to
head, display first 10.du -hc * | grep “[0-9]M” | tail | sort -nr
Display
human readable, grand total, pipe to grep, search for all lines with a
number followed by “M”, pipe to tail (which will display the bottom
lines, pipe to sort, sort in numeric reverse order.find / -type f -size +1024k -exec ls -al {} \; | head -25
-type f
– this means include only regular files-size +1024k
– this means include only files larger
than 1,024K-exec ls -al {} \;
– execute the ls command with the
-al options.
{}
is a placeholder for the files found by the file
command.Space, Right Arrow or swipe left to move to next slide, click help below for more details