首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

linux系统用write和wall命令实现对话

一、  write 用法:write 用户名;敲回车后,自己和对方将会同时处于聊天的状态,但是被发起连接的人只能收到发起聊天请求的人的聊天内容,但是不能回复,如果想要回复的话必须先向对方发起连接,这样以来两个人就可以聊天了,注意root可以向任何发起连接,但是其它人是不能向root发起连接的,默认情况下root的message 是disabled的。如果非要给root发起请求的话要先把root的mesg设置为y,这样设置:以root身份下输入,mesg y这样就可以了,这样其它用户就可以给root发起连接了。 uptime 使用权限:所有使用者 使用方式: uptime [-V] 说明: uptime 提供使用者下面的资讯,不需其他参数: 现在的时间 系统开机运转到现在经过的时间 连线的使用者数量 最近一分钟,五分钟和十五分钟的系统负载 参数: -V 显示版本资讯。 范例: uptime 其结果为: 10:41am up 5 days, 10 min, 1 users, load average: 0.00, 0.00, 1.99 二、  wall 用法:wall 敲回车后,即可输入自己想要说的话,将所要说的话输入完成后,按ctrl+D,这样所有在线的用户就可以同时收到信息的内容,不过这个只能发一次,下一次再发的话还得从头再来,如果两个在线用户想一直聊的话就得用write命令。

01
您找到你想要的搜索结果了吗?
是的
没有找到

Thrift编译错误('::malloc' has not been declared)

问题版本:0.9.0 make[4]: Entering directory `/tmp/X/thrift-0.9.0/lib/cpp' /bin/sh ../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..  -I/usr/local/thirdparty/boost/include -I./src -I./src/thrift -I/usr/local/thirdparty/openssl/include -Wall -g -O2 -MT Thrift.lo -MD -MP -MF .deps/Thrift.Tpo -c -o Thrift.lo `test -f 'src/thrift/Thrift.cpp' || echo './'`src/thrift/Thrift.cpp libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/thirdparty/boost/include -I./src -I./src/thrift -I/usr/local/thirdparty/openssl/include -Wall -g -O2 -MT Thrift.lo -MD -MP -MF .deps/Thrift.Tpo -c src/thrift/Thrift.cpp  -fPIC -DPIC -o .libs/Thrift.o In file included from src/thrift/Thrift.cpp:22: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cstdlib:119: error: '::malloc' has not been declared /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cstdlib:127: error: '::realloc' has not been declared src/thrift/Thrift.cpp: In member function 'void apache::thrift::TOutput::printf(const char*, ...)': src/thrift/Thrift.cpp:46: error: 'malloc' was not declared in this scope make[4]: *** [Thrift.lo] Error 1 解决方法: 在成功执行configure后(在未执行configure之前找不到下列两行),修改与configure同目录下的config.h文件,将文件中的如下两行注释掉: #define malloc rpl_malloc #define realloc rpl_realloc 附1:安装Thrift命令行: ./configure --prefix=/usr/local/thirdparty/thrift-0.9.0 --with-boost=/usr/local/thirdparty/boost --with-libevent=/usr/local/thirdparty/libevent CPPFLAGS="-I/usr/local/thirdparty/openssl/include" LDFLAGS="-ldl -L/usr/local/thirdparty/openssl/lib" --with-qt4=no --with-c_glib=no --with-csharp=no --with-erlang=no --with-perl=no --with-ruby=no --with-haskell=no --with-go=no --with-d 当OpenSSL未以默认安装目录时,请注意上面的用法。 附2:相关博文: (安装thrift时,注意openssl参数)http://blog.chinaunix.net/uid-20682147-id-3399150.html 如果在使用Thrift时,编译遇到类似“TTransport.h:107: error: 'uint32_t' does not name a type”的错误,只需要在Thrift.h文件中增加一行:#include 。 Thrift.h文件位于make install后的include目录下,如果不知道在哪,可以使用find命令查找。

03
领券