process ID whose user is 'mint' and whose name is 'sh.
11. fg, bg
Sometimes, the command takes a long time to complete. In this case, we can run the 'bg 'command in the background, while 'fg' can be used in the foreground.
We can start a program in the background through:
find .-name *iso >/tmp/res.txt
A running program can also be run in the background by combining the "CTRL + Z" and "bg" commands.
1. function prototype: The function prototype describes the function-to-compiler interface, that is, it informs the compiler of the type of the function return value and the number of parameter types.
2. pointer and const:
There are two kinds of const usage: one is to point the pointer to a constant object (the pointer refers to const), and the other is to declare the pointer itself as a constant (the pointer is const ).
Int age = 39;
Const int * PT = age;
Int const * PT and const int
position (here with the position of the finger cursor)Now you can double-click the arrow keys and insert "s" into the install.If you want to copy the text from the browser to the terminal, you can use the shortcut "SHIFT + Insert".2. Pausing and running commands in the background
CTRL + z – Pause application
fg– the program to the front desk again.
How do you use this technique?Imagine you are editing a file with nano:
sudo
to open an explanation of backslash escaping in this command. Appending the appropriate escape sequence to the following options can change the display color of the echo command output. echo Displays color-related references in the text with three style,frontground and background. Each of the parameters has 7 values in a detailed format such as the following:Style Foreground background1st Digit 2nd Digit 3rd digit0-reset 30-black 40-black1-
last command becomes this:
sudo apt-getinstall ranger
If you don't know what sudo is, poke it here.3. Pausing and running commands in the backgroundI have written a guide to how to run commands in the terminal background.
CTRL + Z-Pause Application
FG-Re-call the program to the front desk
How do you use this technique?Imagine you are editing a file with nano:
sudo nano abc.txt
File editing in half you rea
Summary of commands common to LinuxAccording to the bird Brother Linux private dishes defined: must first learn the instructions:ls, more, cd, pwd, rpm, ifconfig, FindLogin and Logout (aircraft and aircraft):telnet,Login,Exit,Shoudown,rebootLinux Multi-person multi-work and background function: [Ctrl]+[z],FG,PS,KillArchives and Records management:CD,pwd,ls,Cat, More,mkdir,RM,rmdir,MV,CP,LN,Find,Whereis,chmod,Chown,chgrp,DF,du disk and hard management
Shell support function control, with the following command to achieve the front and rear switch: 1. command let the process run in the background 2. Jobs view Process 3 running in the background. FG%n Let the background run the process N to the foreground to 4. BG%n Let the process n Go backstage5. Kill%n kills Job PS: "N" is the job number that the jobs command sees, not the process number. FG, BG, Jobs, ,
from the network. Sends the hang-off signal to the control process.Tcgetpgrp, TCSETPGRP, and TCGETSID functions#include pid_t tcgetpgrp (int fd);int tcsetpgrp (int fd, pid_t pgrp);The TCGETPGRP function returns the process group ID that invokes the foreground process, which is associated with the terminal opened on FD.Assuming that the process has a control terminal, the process can call TCSETPGRP to set the foreground process group ID to PGRP. FD must refer to the control terminal of the sessi
A label component has been used in the previous article.The steps for using the components are as follows:1. Create this control2. Specify the master of this space, that is, which one of the controls belongs to3. Tell GM (geometry manager) that a control has generated aHow to use 1.text propertiesImport Tkinter top=tkinter. Tk () label=tkinter. Label (top,text= "Hello World") Label.pack () How
related commands for front and rear switch:1, After the command to add this match, let the process run in the backgroundFor example:#ping 127.0.0.1 //This time the ping 127.0.0.1 process is running in the background2. Ctrl + Z Use this key combination You can put a command that is executing in the foreground in the background and pauseFor example:#ping 127.0.0.1Hold Ctrl + Z //At this point the ping 127.0.0.1 process is suspended to the background and suspended from running3. Jobs See how man
tab matches the command complete, auto completion path/Command Yes: Clear All content before the cursor to the beginning of the line "can be used to delete entire lines of the entered command": Clears the contents of the cursor to the end of the lineThe up and down keys to view previously executed commands orthere will be a hint to search for the key words you entered Bash's history when you find a command that is not the one you want, you can continue to press CTRL + R to find the next matching
# #进程在shell后台运行ctrl +z # #把占用shell的进程打入后台运行暂停工作jobs # #查看被打入后台的进程信息fg Job number # #把指定进程调回前台bg job number # #运行起来后台停止的进程ctrl +c # #关闭占用shell进程4. How to control processes with commands1) SignalSignal 1 # #reload进程 (not in process case reread profile) Signal 2 # #ctrl +C Delete process in memory information Signal 3 # #内存中的鼠标信息清除 (ctrl+\) Signal 9 # #强行关 Closed process (closed single process) signal # #正常关闭进程 (sub process closed after main process) s
FG, BG, Jobs, , Nohup, Ctrl+z, CTRL + C command
First,
Added at the end of a command, you can put this command in the background to perform, such as
Watch-n sh test.sh #每10s在后台执行一次test. Sh script
Two, CTRL + Z
A command that is executing in the foreground can be placed in the background and paused.
Third, Jobs
See how many commands are currently running in the background
The JOBS-L option shows that the pid,jobs status of all tasks can be ru
[, Fillchar]) >>> a = ' Wang ' >>> a.rjust (' 28, split, slices the string by specifying a delimiter, and if the parameter num has a specified value, separates only the NUM substring, syntax:str. Split(str="", num=string. Count(str)). >>> a = ' Wang Wang Wang Wang ' >>> a.split (' A ', 3) [' W ', ' ng w ', ' ng w ', ' ng Wang ']29, Rsplit>>> A ' Wang Wang Wang ' >>> a.rsplit (' A ', 3) [' Wang W ', ' ng w ', ' ng w ', ' ng ']30, Splitlines, separated by line (' \ r ', ' \ r
the rows as elements, if the argument keepends is False, does not contain a newline character, and if true, the newline character is preserved. split (Sep[,maxsplit]): Slices a string by specifying a delimiter and, if the parameter maxsplit has a specified value, separates only Maxsplit substrings, returning the segmented list of strings. Rsplit (Sep[,maxsplit]): Same as split (), but starting from the right. Look at the following examplestr1 = ' ab c\n\nde
tkinter# contains a button, Buttontop = Tkinter. Tk () quit = Tkinter. button (top, text= "Hello world!", command=top.quit) # Here is to create a function button (quit) instead of a label quit.pack () # Display Control Tkinter.mainloop () # run this GUI programOutput effectLabel and Button controlsCombines the above two cases with both a label label and buttonImport tkinter# includes a label and a button, label, Buttontop = Tkinter. Tk () Hello = Tkinter. Label (top, text= "Hello world!"). P
a value of-1, others are represented by a positive integer//The following conversion allows the edge pixels to become -1*255+255=0, that is, black, the rest of the overflow, the assignment is 255, that is, white. Markers.convertto (tmp,cv_8u,255,255); returntmp; }};#endif //WatershedsegmenterMain.cpp#include #include#include#include#include"Watershedsegmenter.h"using namespacestd;using namespaceCV;intMain () {//Read input Image artworkMat image= Imread ("/home/osksh/skin_c/dulani_anuradha4.jpg"
.
I can press two times alt+b so the cursor will be in the following position (where the cursor is referred to).
sudo apt-get^intall programname
Now you can press the arrow keys and insert "s" into the install.
If you want to copy the text from the browser to the terminal, you can use the shortcut key "SHIFT + Insert".
2. SUDO!!
If you do not know this command, I think you should thank me, because if you do not know, then every time you enter a long list of commands after the "permission d
form of an assignment, ECHO is required, like ret=$ (getId "http://www.baidu.com.1234.html"), and only the value of ECHO is passed to the RET variable.
Miscellaneous Knowledge points
Array of strings
[Yanruitao@boss_runtime sh]$ str= "Yan Lulu yrt Yanruitao"
[yanruitao@boss_runtime sh]$ arr= ($str) # This step converts the string to an array
[Yanruitao@boss_runtime sh]$ echo ${arr[*]}
Yan Lulu yrt Yanruitao
[yanruitao@boss_runtime sh]$ echo ${#arr [@]}
4
Common judgment Mark[-Z
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.