CMSC 141: Introduction to Python • quick reference
A short reference for the commands you will use most often in the terminal. Anything in
[brackets] is a placeholder you replace with a real name. Examples use the toy files
cubs.py and white_sox.py.
[path]. The path can be relative to where you are or an absolute path.
cd labs cd /home/student/cs141.)..[dir].[a] to a new file [b]. The original stays put.
cp cubs.py white_sox.py[a] into [b]. Works on files and whole directories.
mv cubs.py white_sox.py renames cubs.pycat cubs.py[a] and [b] into a new file [c] (overwrites [c] if it exists).
cat cubs.py white_sox.py > chicago.pyq to quit.[pattern] inside [file].
grep "print" cubs.pychmod u+x cubs.py lets you run it; chmod 644 cubs.py sets owner read/write and read-only for everyone else.python3 cubs.pyman lsCtrl-d does the same thing.