blob: 52695f138e6220b5c5e0d008f71b982c5b171d82 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#### Job Control
* List jobs, job_id is the numerical value of the job
`$ jobs`
* suspend job into background, similar to pause so that one can can do something else
`<Ctrl-Z>`
* Can resume it's running in the background by:
`$ bg <job_id>`
* Bring it back to foreground by inserting:
`$ fg`
* Or in case of multiple jobs:
`$ fg %<job_id>`
* To suspend the process running in the background, use:
`$ kill -STOP %job_id`
- - -
#### Copying/Moving/Renaming Files/Directories
- Shorter syntax to copy/move from/to current file path (current working directory) `$(pwd)`
NOTE: `.` can also be used but is limited
`$ cp -r $(pwd)/path-to/file ~/new/path/`
`$ mv -r ~/another/directory/file .`
- - -
#### Copying/Pasting Text
- Copy text/output into a file (useful if in putty/non graphical terminal emulator)
`$ <command> 2>&1 | tee output-file`
or
`$ echo "text" 2>&1 | tee output-file` # print text without executing a command
- - -
#### Getting information about a window
- To get id, size, position, state, class, etc...
`$ xwininfo`
or
`$ xdotool getwindowfocus getwindowgeometry` # just get size/position
- - -
|