[linux]Recover a directory by 'mv' command

2018-6-29 写技术

Sometimes mv a directory to a exist directory will cause error.  mv /home/dd/bb /home/cc/bb If bb has always created in cc directory,the bb will be moved to bb as a subdirectory.  So, we key like this in command while doing this:  mv /home/dd/bb /home/cc/ -f

阅读全文>>

标签: linux

评论(0) 浏览(1220)

[linux]How to change password

2017-12-11 写技术

echo user:pass|chpasswd

阅读全文>>

标签: linux

评论(0) 浏览(1284)

[linux]A simple driver of linux

2017-10-23 写技术

hello.c #include <linux/init.h> #include <linux/module.h> static int hello_init(void){ printk(KERN_INFO "Hello nicholas, driver is comming\n"); return 0; } static void hello_exit(void){ printk(KERN_INFO "See you, driver"); } module_init(hello_init); ...

阅读全文>>

标签: linux

评论(0) 浏览(1265)

[linux]LAMP一键web遭遇记

2017-10-8 写技术

这两天居然在搭建LAMP服务器这种事情上翻船了,昨天新买了个阿里云的ECS,座标美国,开开心心地用ssh连上服务器,上传一键web安装脚本,然后运行,由于要一个小时左右,我就先去跑步了,结果回家后一看果然就安装成功了。然而…… netstat -tunl 打下去之后,没有80端口, 一定是哪里不对了,于是检查脚本,手动安装,更换不同版本,简直能想的办法都想尽了, 始终没能跑起来。这一弄就到了凌晨2点,一点也不困,但我心里还是知道的,我这一把年纪了,不宜熬夜,虽然大脚越发清醒,却明明感觉心累,强迫自己关机睡觉。 睡床上还在想,明天应该试试换个系统,...

阅读全文>>

标签: linux

评论(0) 浏览(1082)

[C]Safari对websocket的支持及websocket版本问题的解决记

2017-7-11 写技术

昨天有人反应苹果手机不能访问我的物联网项目,我大惊,立马开始分析。 发现果然苹果端的safari连接websocket失败了。但是我确信之前一直用着好好的。可能是贱贱的A厂悄悄变更了某些软件吧,没办法,谁让世人都称他是老大,谁让你们那么多人没有iPhone不行呢。我只好认为我自己的服务器有问题了。 于是检查服务器的日志,发现websocket的握手过程显示协议错误。 那么我抓包分析下safari与其他浏览器的行为有什么不一样吧: 这是Google: Sec-WebSocket-Key:GX2sEWmKLhgktWvslt8xxw== Sec-WebSocket...

阅读全文>>

标签: ubuntu C linux

评论(3) 浏览(5206)

[linux]ubuntu升级的重要性

2017-3-5 写技术

安装个crosstool-ng, 然后编译个交叉工具:ct-ng build 这一下来各种错啊, stray '177' in program no std iostream 以后一定要记住,新装的ubuntu,会有各种升级提醒,一定要升个级先。

阅读全文>>

标签: linux

评论(0) 浏览(1285)

[linux]arm-linux-ar not found

2017-2-16 写技术

There's an error in compiling Qt_ARM that: arm-linux-ar not found vi src/3rdparty/webkit/Source/JavaScriptCore/Makefile.WebKit Set AR as absolute path like: AR            = /opt/crosstool/gcc-4.4.3/bin/arm-linux-ar cqs It works.

阅读全文>>

标签: linux

评论(0) 浏览(1682)

[linux]invalid conversion from 'void*' to 'HB_PositionRec_*'

2017-2-15 写技术

I get some errors while compilling Qt_ARM: ../3rdparty/harfbuzz/src/harfbuzz-buffer.c: In function 'HB_Error hb_buffer_ensure(HB_BufferRec_*, HB_UInt)': ../3rdparty/harfbuzz/src/harfbuzz-buffer.c:77: error: invalid conversion from 'void*' to 'HB_PositionRec_*' ../3rdparty/harfbuzz/s...

阅读全文>>

标签: linux

评论(1) 浏览(1311)

[linux] The tslib functionality test failed while installing qtlib

2017-2-14 写技术

The tslib functionality test failed!  You might need to modify the include and library search paths by editing  QMAKE_INCDIR and QMAKE_LIBDIR in  /usr/local/Qt_ARM/mkspecs/qws/linux-arm-g++. 1.If installed tslib or not? If not,install it. 2.If defined tslib path exactlly in ...

阅读全文>>

标签: linux

评论(0) 浏览(1794)

[linux]__sync_add_and_fetch is not defined

2017-2-9 写技术

There's an error that "__sync_add_and_fetch is not defined" while I'm building Qt. Just because of gcc I used is version 3.4, It works after I changed gcc to version 4.6.

阅读全文>>

标签: linux

评论(0) 浏览(1341)

Powered by anycle 湘ICP备15001973号-1