rain1024 / gVim-Pathogen

My Coding Life
http://rain1024.github.io/gVim-Pathogen
2 stars 0 forks source link

Linux #9

Open rain1024 opened 10 years ago

rain1024 commented 10 years ago

Command Lines

Categories Command
File system cat · cd · chmod
Processes
User Enviroment
Text Processing
Shell builtins
Networking
Searching
Documentation
Miscellaneous

Storage

File Management

# list directory contents
ls
# list contents of directories in a tree-like format.
tree

Software

apt-get install

References

rain1024 commented 10 years ago

Processes

Process Management

ps

# list process
ps
jobs
# kill process by name
ps -9 process_name

Monitoring

tmux

# creates a new tmux session named session_name
tmux new -s session_name

#attaches to an existing tmux session named session_name
tmux attach -t session_name

# switches to an existing session named session_name
tmux switch -t session_name

# lists existing tmux sessions
tmux list-sessions

# detach the currently attached session
# you can do either Ctrl-b d
# or Ctrl-b : detach
tmux detach (prefix + d)

Ref: [1], RU: screen

rain1024 commented 10 years ago

Networking

wget

# download from url
wget download_url

### ssh
```sh
# connect to server
ssh user_name@host_name
# RU: putty
rain1024 commented 10 years ago

Create tar.gz

tar -zcvf tar-archive-name.tar.gz source-folder-name 

Extract a tar.gz compressed archive you can use the following command

tar -zxvf tar-archive-name.tar.gz