
I'm using Haddock and Dunn's excellent
Practical Computing For Biologists to learn how to use the "shell" to access files on my Mac.
Here are the basic shell commands they discuss in Chapter 4. I'm only annotating those that don't have an analog in R, or that I don't remember from using the DOS prompt on my family's 386 desktop back in the '90s!
Directory/file information:lsls -als -lls -l -apwdNavigation:cd ..exitView filescat
less -- view text files
man -- view "manuals"/help files
Directory/file manipulationmkdirrmdircp -- copying files
mv -- moving files
rmMisc.
alias -- in your bash_profile; creates shortcuts
chmod -- "change mode"
cat .bash_profile -- print the contents of the file that set your shell settings
echo $PATH -- print the locations where the shell looks for programs to be located
which -- shows the location of a program or command is stored
curl -- "see URL"; download web data
wc file -- character, word, and line count for a file
historyhistory | grep "search" -- "pipe" your command history over to grep and have grep locate commands with the term "search" in them.
Curl-0 -- output operator
Modifiers to grep-i -- ignore case of search term
-v -- "not" or "except"
-c
-E
-l
-n
-h