Linux Stuff Last Update Copyright 2014 Kenneth M. Chipps Ph.D. 1
Objectives of This Section Learn –Enough about Linux to do the labs Copyright 2014 Kenneth M. Chipps Ph.D. 2
Common Commands pwd –Shows the current directory cd –Change directories cp –Copy mv –Rename Copyright 2014 Kenneth M. Chipps Ph.D. 3
Common Commands rm –Remove mkmir –Make a directory rmdir –Delete empty directories Copyright 2014 Kenneth M. Chipps Ph.D. 4
Common Commands ls –Show a list of whatever is in the directory –Switches -a –Show everything -F –List by type -l –Detailed listing -t –List by date Copyright 2014 Kenneth M. Chipps Ph.D. 5
Common Commands To show one screen full of filenames at a time –ls –l | less Copyright 2014 Kenneth M. Chipps Ph.D. 6
Common Commands ln –Create a link file –To find out what type of file the file is cat –Display what is inside a file Copyright 2014 Kenneth M. Chipps Ph.D. 7
Common Commands head –Show the first 10 lines of a file –As in head filename –Or specify the number of lines with head –n20 filename Copyright 2014 Kenneth M. Chipps Ph.D. 8
Common Commands tail –Show the last 10 lines of a file –As in tail filename –Or specify the number of lines with tail –n20 filename Copyright 2014 Kenneth M. Chipps Ph.D. 9
Common Commands more –Shows a file one page at a time less –Shows a file one page at a time –But allows scrolling through the file –q to quit it Copyright 2014 Kenneth M. Chipps Ph.D. 10
Common Commands grep –To search through a file –For example grep whattosearchfor filetolookin or grep ‘word word’ filetolookin find –Looks through directories for a file Copyright 2014 Kenneth M. Chipps Ph.D. 11