1/93
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
display program output
debug
find and fix program errors
shell
in unix, the primary end-user, command-line interface to the system is a program called
unix system
computer systems that provide a unix environment
operating system
primary piece of software on most computers, a program or collection of programs that manage the computer’s resources for its users and the other programs that those users run
$
represents the prompt
ssh
secure shell comand
pwd
print the absolute path of the current working directory
absolute path of home directory
/home/myid/username
/
represents the root directory of the system, an absolute path always starts with this
print the system date and time
exit
exit the currrent shell
whoami
print the user name associated with the current user
ssh user@hostname
start a secure shell connection to hostname and login as user
ls
list contents of the current working directories
ls PATH
list contents of the last directory in the provided PATH
tree PATH
list contents of the last directory in the provided PATH and its subdirectories, in a tree format
ls -l
ls uses long listing formats
ls -l -h
ls uses long listing format with human-readable size units
cd
home directory
cd -
last previous working directory
cd a/b/dest
dest, assuming a is in the current directory and a/b/dest is a valid relative path
cd /a/b/dest
dest, assuming /a/b/dest is a valid absolute path
cd ~/a/b/dest
dest, assuming a is in your home directory and ~/a/b/dest is a valid path
.
path alias for the directory itself
..
path alias for parent of the directory (parent directory)
ls -a
ls shows hidden files (those that start with .)
ls .
ls lists the contents of . (current directory); same as ls with no arguments
ls ..
ls lists the contents of .. (parent directory)
cd ..
cd changes working directory to .. (parent directory; “up one”)
cd ../..
cd changes working directory to ../.. (parent of parent directory; “up two”)
C
CTRL (control)
M
META (meta): usually ALT, OPT, or ESC
S
SHIFT (shift)
C-a
move the cursor to the beginning of the line
C-e
move the cursor to the end of the line
C-f
move the cursor forward (right) one character
M-f
move the cursor forward (right) one word
C-b
move the cursor backward (left) one character
M-b
move the cursor backward (left) one word
C-p
backward one line through the command history
C-n
forward one line through the command history
C-r
reverse incremental search through command history
C-s
forward incremental search through command history
C - < (C-S-)
when in incremental search, move to beginning of command history
C - > (C-S- .)
When in incremental search, move to end of command history
cat
(concatenate [to standard output] command) displays the entire contents of a file all at once
mkdir
make a new directory
mv SOURCE DEST
rename SOURCE to DEST
mv SOURCE … DIRECTORY
move SOURCE(s) into DIRECTORY
cp SOURCE DEST
copy SOURCE to DEST
cp SOURCE … DIRECTORY
copy SOURCE(s) into DIRECTORY
rm
(remove command) to delete a file in Unix
-r
(recursive) option; to make rm recusrively remove the contents of a directory so that it can remove it
emacs
a powerful text editor that can run directly inside the terminalC
C-x C-f
open/find file
C-h t
emacs tutorial
C-x C-c
close/exit emacs
C-x C-s
save current buffer
C-g
quit/cancel a partially typed command
C-v
move down one page
M-v
move up one page
C-l
scroll to make the current line appear in the center, bottom, then top
M-g M-g
go to line (enter the number at prompt, then press RET)
M-<
move to beginning of buffer
M->
move to end of buffer
C-d
forward delete a single cahracter (similar to the delete key)
M-d
forward delete a word
C-x u
undo one batch of changes (usually one command worth)
C-/
undo one batch of changes (usually one command worth)
C-<SPC>
set the mark point (start a selection)
C-k
kill / cut to the end of the line (goes to kill buffer)
C-w
cut selection (goes to kill buffer)
M-w
copy selection (goes to kill buffer)
C-y
paste / yank (from kill buffer)
C-x h
select all
C-s
incremental search (forward direction)
C-r
incremental search (backward direction)
M-%
query replace
C-x 1
close other windows (maximize current window)
C-x 2
split window horizontally (stacked top and bottom)
C-x 3
split window vertically (side-by-side)
C-x o
switch cursor focus to the other window
C-x C-b
list available buffers
packages
used to organized code
simple class name
class name; will always begin with a capital letter; ex) Scanner
package name
will always be lowercase; ex) java.util
fully qualified name (FQN)
ex) java.util.Scanner
primary benefits of packages
1) name space management
2) access protection
src
default package for source code; will contain .java files
bin
default package for compiled code; will contain .class files
-cp
class path; the path to default package for compiled code
-d
destination
javac
compilation command