linux socat
Linux provides different philosophy and use cases from system point of view. `socat` is very interesting command which provides us the ability to redirect input and outputs from different type of system resources like network, file, command, socket etc.
从系统角度来看,Linux提供了不同的原理和用例。 socat是一个非常有趣的命令,它使我们能够从不同类型的系统资源(例如网络,文件,命令,套接字等)重定向输入和输出。
为Debian,Ubuntu,Mint和Kali安装 (Install For Debian, Ubuntu, Mint and Kali)
socat
can be install dpkg based distributions like below by using apt
command.
可以使用apt
命令像下面那样安装socat
基于dpkg的发行版。
$ sudo apt install socat -y
为Fedora,CentOS,RHEL安装(Install For Fedora, CentOS, RHEL)
We can install for Fedora, CentOS and RHEL like below.
我们可以像下面那样为Fedora,CentOS和RHEL安装。
$ sudo yum install socat
句法 (Syntax)
Syntax of socat is very simple. We need to just provide the input and output with related options.
socat的语法非常简单。 我们只需要为输入和输出提供相关选项即可。
socat INPUT_TYPE(OPTIONS) OUTPUT_TYPE(OPTIONS)
- INPUT_TYPE specifies the file, stream or network socket we will read INPUT_TYPE指定我们将读取的文件,流或网络套接字
- OUTPUT_TYPE specifies file, stream or network socket we will writeOUTPUT_TYPE指定我们将编写的文件,流或网络套接字
- OPTIONS specifies some configuration about INPUT or OUTPUTOPTIONS指定有关INPUT或OUTPUT的一些配置