[LINUX] Day1: Learning Linux - the beginning
11/15/2019
All references are going to be based on this blog 초코몽키의 개발공부로그
Daily log for what I learn for the day: summaries and notes
1. What is Linux? Linux Journey
Linux Shortcuts 1 (Basic)
- echo: Display text arguments
- pwd: Print working directory
- cd: Change Directory
- cd . : Current directory
- cd .. :Directory above your current
- cd ~ : Default directory
- cd - : previous directory you were just at
- ls: List Directories
- ls -a: view hidden directory
- ls -l: Shows a detailed list of files in a long format
- ls -a: Shows everything -l and -a
- touch: Create new empty files
- file: To find out what kind of file it is
- cat: displays contents and combine multiple files and show the output
- less: display in file so that can navigate through a text file page by page
- q: quit out of less and go back to your shell
- Page up, Page down, Up and Down: Navigate using the arrow keys and page keys
- g: Moves to beginning of the text file
- G: Moves to the end of the text file
- /search: You can search for specific text inside the text document. Prefacing the words you want to search with /
- h: If you need a little help about how to use less while you’re in less, use help
- history: show the history
- clear: clear your display
- cp: copy files
- * : wildcard of wildcards
- ? : represent one character
- [ ] used to represent any character within the brackets
- cp -r : recursively copy the files and directories within a directory
- cp -i : prompt you before overwriting a file
- mv: move files and also renaming the
- mv -i : prompt you before overwriting a file
- mv -b: allow to backup of that file and rename the old version with a~
- mkdir: Make Directory
- mkdir -p : can create subdirectories at the same time
- rm: Remove files
- rm -f : can remove a bunch of files
- rm -I: can remove all whether they are write protected or not, without prompting the user
- rm -r: whether you want to actually remove the files or directories
- rmdir : cant remove default but can remove all the recursive and any subdirectories it may have
- find: can find specific file
- ex. $ find /home -name puppies.jpg
- ex. $ find /home -type d -name MyFolder
- help: can also use with echo, logout, pwd, etc
- help echo: description of options
- help echo: description of options
- man: can see the manuals for a command. Man pages are manuals that are by default built into most Linux operating systems. They provide documentation about commands and other aspects of the system.
- whatis: gives brief description of command line programs
- eg. whatis cat
- alias: to create alias for a command you simply specify an alias name and set it to the command
- eg. $ alias foobar = ‘ls -la’
- eg. $ unaries foobar: execute that command
- exit or logout: close terminal