Linux Commands Flashcards
cd
change directory (without specifications changes to home automatically)
hostname
displays system name
TAB key
autocomplete as much of filename as system can
- if name has been completed, there will be a space after name
- press TAB again to display a list of possible completions
TAB key + RETURN key
execute command (that was autocompleted)
ls-l
determine file type
- hyphen infront of file listed = regular file
- b or C indicates a device file
- d indicates a directory file
ls commands can be combined!
ls -ld
detailed listing command, get info on just directory files
ls -a
show all files including hidden files
ls -A
show Almost all files, not include . and .. files
ls -F
displays / after directory, * after executable file
pwd
print working directory
cd directorypath
change to a directory
mkdir directorypath
create a subdirectory with a directory
mkdir -p
create parent directories and directories
rmdir directorypath
removes empty directories
mv sourcepath destinationpath
move file to a new location OR rename file OR moves directories
mv -i
asks for confirmation if file already exists before moving
lpr
put one or more file in que for printing
lpr -P [insert printer name] [insert filename]
place file in que for specific printer
lpstat -p
display list of available printers
lpstat -o
view which jobs are in printer
lprm
remove job from printer
cp sourcepath destinationpath
copy file from one location to another, or backup important files
cp -i
asks for confirmation if file already exists before copying
cp -r
allows for copying of directories and their contents