HW IN SUBPAGES BELOW
09/10/2019:
Commands from HW2:
DIRECTORY STRUCTURE
- Shows you the shell that you are using
Pwd – shows you the current directory
- ls – lists the files on the computer
- ls -l – from “ls --help” – “uses a long listing format”
- ls -l -h – from “ls --help” – “prints in human-readable format”
o only slightly different from ls -l : lists file size differently
- mkdir new_directory – make directory “new_directory”
- cd .. – move back one directory
- rmdir new_directory – remove directory (removed “new_directory”)
- hitting up arrow – allows you to access previous commands without re-typing them
- ls – CFx\usr\bin – lists directories
- g++ - “GNU C++ compiler invocation command” (google), used for compiling/linking commands/source code
- hitting tab after ls /home/cms adds the “-opendata” – fills in a previously used command
- whoami – returns user name
- echo - displays lines of text/strings
- ~ - references home directory
FILE OPERATIONS:
- mkdir TEST – make directory “TEST”
- cd TEST/ - change directory to TEST, hitting tab fills in the rest of the word
- touch file1 file2 test1 test2 – creates four files, called file1, file2, test1, test2
- find . -name “test*” – find any file beginning with “test”
- find . -name “file*” – find any file beginning with “file”
- find . -name “*1” – find any file ending with “1”
- find . -name “*2” – find any file ending with “2”
- rm file1 file2 test1 test2 – remove the four created files
09/12/2019:
HW2 code
EMACS:
cd ~/TEST -- moves to the directory named "TEST"
emacs -nw test.txt -- creates an emacs file called "test.txt" without opening a new window (-nw allows you to write the emacs file directly in the terminal)
above: creating an emacs document
above: saving an emacs document
cat test.txt - view content in file test.txt
more test.txt - view content in a file in a scrollable format (one page at a time, human-readable)