Static picture
12U00 — Static

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.


Locations in home

$HOME/binLocal binaries
$HOME/etcSystem configuration for local binaries
$HOME/gamesLocal game binaries
$HOME/includeLocal C header files
$HOME/libLocal libraries
$HOME/lib64Local 64-bit libraries
$HOME/manLocal online manuals
$HOME/sbinLocal system binaries
$HOME/shareLocal architecture-independent hierarchy
$HOME/srcLocal source code


lsList files in the directory
cdChange directory
rmRemove file or directory(-r)
cpCopy file or directory(-r)
mvMove file or directory
wcCount words in file
manRead the manual
catReads content of files sequentially
mkdirMake new directory
dateShow system date
grepSearches text for matches of a regular expression
tailDisplays 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


ls > fooSend output from ls into file foo
wc < fooReceive input from file foo into wc
ls | wcConnect output of ls into input of wc


-aAll, Append-nNumber
-bBuffer, Batch-oOutput
-cCommand, Check-pPort
-dDebug, Delete, Directory-qQuiet, Quit
-eExecute, Edit-rRecurse
-fFile, Force-sSilent
-hHeaders, Help-uUser
-iInteractive-vVerbose, Version
— Submit an edit to unix.htm(128 lines)
Plan 9 is a fully-featured, clean, compact and uniform operating system built as a successor to Unix. picture
plan9 — Plan 9 is a fully-featured, clean, compact and uniform operating system built as a successor to Unix.

incoming(1): firth

Last update on 14K11, edited 2 times. +9/16fh deadend ----|-