EMT 2390L Lecture 3 Dr. Reyes Reference: 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_name o 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 link o 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 execute o type cd which – to find the location of a particular executable o which cd help – display information about a command o help cd man – displays the manual of a command o man cd apropos – displays appropriate commands o apropos cd
More Commands whatis - displays the name and a one-line description of a man page matching a specified keyword o whatis bash info – an alternative to man pages o info cd alias – to create your own composite commands o 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