EMT 2390L Lecture 3 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.

Post on 19-Jan-2018

235 views 0 download

description

Wildcards Wildcards - allows you to select filenames based on patterns of characters.

Transcript of EMT 2390L Lecture 3 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.

EMT 2390LLecture 3

Dr. ReyesReference: The Linux Command Line, W.E. Shotts

Outline• Wildcards• Commands• Aliases

Wildcards• Wildcards - allows you to select filenames based

on patterns of characters.

Character Classes

Wildcards examples

mkdir Command• mkdir – creates a directory

o mkdir dir_nameo mkdir dir1, dir2, … , dirN

cp Command• cp – copies a file or directory

cp examples

mv Command• mv - performs file moving or file renaming

mv Examples

rm Command• rm - used to remove files and directories

rm Examples

ln Command• ln - used to create either hard or symbolic links

o Hard Links - ln file linko Symbolic Link - ln -s item link

• Hard Links - The original Unix way of creating links. It cannot reference a file outside its own filesystem and cannot reference a directory.

• Symbolic Links - creates a special file with a pointer to the referenced file or directory, similar to a shortcut in Windows.

More commands• type – given a command name it will display the

command the shell will executeo type cd

• which – to find the location of a particular executableo which cd

• help – display information about a commando help cd

• man – displays the manual of a commando man cd

• apropos – displays appropriate commandso apropos cd

More Commands• whatis - displays the name and a one-line

description of a man page matching a specified keywordo whatis bash

• info – an alternative to man pageso info cd

• alias – to create your own composite commandso Usage: alias name=‘command1; command2; … ; commandN'o e.g. alias foo='cd /usr; ls; cd -‘

Assignments• Check the class OpenLab site for new Labs• Check Blackboard for new Quizzes