Linux redirection – stdin, stdout – terminal type

Standard input (standard input) 0 defaults to accept input from the keyboard Standard output (standard output) 1 default output to the terminal window (screen) Standard error output (standard error output) 2 default output to the terminal window (screen) # View the process number of the current terminal [root@sc ~]# echo $$ 13082 cd /etc/proc/12082/fd [root@sc […]

Standard IO_open and close files_fopen, fdopen, freopen, stdin, stdout, stderr

Directory 1. Open the file 1.1 fopen function prototype 1.1.1 fopen function 1.1.2 Principle of fopen function 1.1.3 What is the difference between text files and binary files? 1.1.4 What is the difference between “r” mode and “rb” mode? 1.1.5 Example of using fopen function 1.2 fdopen function prototype 1.2.1 fdopen function 1.2.2 Principle of […]

shell command ping & pstree & id & chmod & chown & “> and &>” & format time & –stdin –stdout

ping & amp; pstree & amp; id & amp; chmod & amp; chown & amp; “> and & amp;>” & amp; format time ping concept Common parameters Check if the target host is connected pstree id chmod chown > and &> format time –stdin –stdout ping Concept Ping is often used to test the connectivity […]

python@call system command line @os.system@subprocess@standard input and output @[email protected]@input@print

Article directory python@call system command line @os.system@standard input and output @[email protected]@input@print summary os.system demos windows command interpreter @ComSpec subprocess@recommended basic usage demos standard input and output sys.stdin input() sys.stdin.input@input() interactive mode summary sys.stdout sys.stdout.wirte()@print() read from a file @fileinput fileinput.input()@ input content from the file The command line argument provides the filename summary python@call system […]

[Solved] Solve the problem of incomplete files when dragging files into the virtual machine [Vmware]|[CentOS][“gzip: stdin: unexpected end of file”]

Table of Contents 1. Antecedents: Second, the solution: enable shared folders ①Enable setting method of shared folder: ③Installation of vmware-tools 1. Antecedent: Recently, I am learning about hadoop and hive, and I need to build a pseudo-distributed practical environment for practice. So VMware and CentOS were installed. And downloaded the JDK, Hadoop, Hive and other […]

[Solved] KEIL does not use microlib to report an error __stdin __stdout duplicate definition

Keil does not use microlib, add the following function to the file to redirect printf void _sys_exit(int x) {<!– –> x = x; } FILE __stdout; FILE __stdin; int fputc(int ch, FILE *f) {<!– –> HAL_UART_Transmit( & amp;s_uart1Handle, (uint8_t *) & amp;ch, 1, 0xFFFF); return ch; } If the compilation error __stdin __stdout duplicate definition, […]

[Solved] gzip: stdin: unexpected end of file tar: abnormal EOF solution in archive file (multiple re-downloads are invalid)

Reason: The compressed package downloaded for the first time is incomplete, and the decompressed folder is retained, resulting in the subsequent re-downloaded files with the same name as (1) (2)…, the system decompression still uses the first One. Just delete the incomplete ones. The following is a detailed description gzip: stdin: unexpected end of file […]