
Unix is a family of computer operating systems that derive from the original Unix from Bell Labs.
This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.
Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't insist on interactive input.
jargon
- NIH Syndrome: Or Not Invented Here, to avoid using already existing products, research, standards, or knowledge because of their external origins or costs.
- Anti-Pattern: A common response to a recurring problem that is usually ineffective and risks being highly counterproductive.
- Worse Is Better: The idea that quality does not necessarily increase with functionality. Software that is limited, but simple to use, may be more appealing to the user and market than the reverse.
- Dogfood: A way for an organization to demonstrate confidence in its own products, by using the product itself. A way to test it in real-world usage, acting as quality control and a kind of testimonial advertising.
- Stovepipe: A system that has the potential to share data or functionality with other systems but which does not.
- The Cathedral model: The source code is available with each software release, but code developed between releases is restricted to an exclusive group of developers.
- The Bazaar model: The source code is developed over the Internet in view of the public.
- XY Problem: You want to do X, and you think Y is the best way of doing so. Instead of asking about X, you ask about Y.
- Second System Effect: The tendency of small, elegant, and successful systems, to be succeeded by over-engineered, bloated systems, due to inflated expectations and overconfidence.
- Benevolent Dictator For Life: A open-source software development practice where project founders retain the final say in disputes or arguments within the community.
- Yak Shaving: Refers to a task, that leads you to perform another related task and so on, and so on — all distracting you from your original goal.
Locations in home
| $HOME/bin | Local binaries |
|---|---|
| $HOME/etc | System configuration for local binaries |
| $HOME/games | Local game binaries |
| $HOME/include | Local C header files |
| $HOME/lib | Local libraries |
| $HOME/lib64 | Local 64-bit libraries |
| $HOME/man | Local online manuals |
| $HOME/sbin | Local system binaries |
| $HOME/share | Local architecture-independent hierarchy |
| $HOME/src | Local source code |
Primitives
ls | List files in the directory |
cd | Change directory |
rm | Remove file or directory(-r) |
cp | Copy file or directory(-r) |
mv | Move file or directory |
wc | Count words in file |
man | Read the manual |
cat | Reads content of files sequentially |
mkdir | Make new directory |
date | Show system date |
grep | Searches text for matches of a regular expression |
tail | Displays the tail end of a file or data |
Copy a file
$ cp readme.txt documents/
Duplicate a file
$ cp readme.txt readme.bak.txt
Copy a directory
$ cp -a myMusic myMedia/
Duplicate a directory
$ cp -a myMusic/ myMedia/
Move a file
$ mv readme.txt documents/
Move a directory
$ mv myMedia myMusic/
Rename a directory
$ mv myMedia/ myMusic/
Merge directories
$ rsync -a /images/ /images2/
Create a new file
$ touch 'new file'
Create a new directory
$ mkdir 'untitled folder'
Show file/directory size
$ du -sh node_modules/
Show file/directory info
$ stat readme.md
Open a file with the default program
$ xdg-open file # on Linux
Zip a directory
$ zip -r archive_name.zip folder_to_compress
Unzip a directory
$ unzip archive_name.zip
Peek files in a zip file
$ unzip -l archive_name.zip
Remove a file
$ rm my_useless_file $ rm -r my_useless_folder
List directory contents
$ ls my_folder # Simple
Tree view a directory and its subdirectories
$ tree
Find a stale file
$ find my_folder -mtime +5
View content of a file
$ cat apps/settings.py
Search for a text
$ grep -i "Query" file.txt
Make applications in ~/bin/ available from anywhere
Edit ~/.bashrc, when finished run source ~/.bashrc.
export PATH=$PATH:$HOME/bin
Pipes
ls > foo | Send output from ls into file foo |
wc < foo | Receive input from file foo into wc |
ls | wc | Connect output of ls into input of wc |
Options
-a | All, Append | -n | Number |
-b | Buffer, Batch | -o | Output |
-c | Command, Check | -p | Port |
-d | Debug, Delete, Directory | -q | Quiet, Quit |
-e | Execute, Edit | -r | Recurse |
-f | File, Force | -s | Silent |
-g | Group | -t | Tag |
-h | Headers, Help | -u | User |
-i | Interactive | -v | Verbose, Version |
-j | -w | Width | |
-k | Keep | -x | Extract |
-l | List | -y | Yes |
-m | Message | -z |

incoming(1): firth
Last update on 14K11, edited 2 times. +9/16fh deadend ----|-