LINUX FIRST COUPLE OF WEEKS PRACTICE THESE IN THE SHELL Command Example Definition ctrl-c = Stop the execution of a program q = Quit a man page or the pager ls >ls = list Directory contents Examples: >ls >ls -l >ls -li [long listing with inode numbers] >ls -la >ls -l |less [large directory piped to less] >ls -lh |less [human readable listing] pwd >pwd = Print Working Diretory space = Spaces at the command line a very important cd >cd = Change Directory Examples: >cd .. [move up one directory] >cd /etc [move the /etc directory] >cd [move to you home directory >cd ~username [move to usernames home] . = Hidden Files start with a dot mkdir >mkdir = Make a Directory touch >touch [name] = Create a file/ change timestamp >touch .[name] = Create a hidden file cat >cat [filename] = Concatenate files and displays on screen apropos >apropos [filename] = Searches the small manual page in the whatis database grep >grep [string] [file] = Searches for lines matching a pattern rm >rm [filename] = removes a file man >man ls = Manual Page cp copy a file Examples: >cp [source_file] [destination_file] >cp /etc/passwd ./passwordfile [copies passwd file to current directory and changes the name at the same time] >cp ../file1 file1 [copies file1 from the parent to the current directory] >cp file1 newfile1 While in man, to search: /[string] ?[string] Pagers: Less More Command Line History: up arrow down arrow Command Line Completion: Tab