Linux Cookbook 3
Files And Dirs
1. touch ---create a new, empty file
vi filename is also ok
2. mkdir ---make directory
mkdir -p ---to make all directories in the path
3. space in filename
use '' or "" or \
ls 'top secret'
ls "top secret"
ls top\ secret
4. cd ---change the current working dir
1)cd ---To make your home directory the current working directory
2)cd - ---Changing to the Last Directory You Visited
3)pwd ---Getting the Name of the Current Directory
5. ls ---Listing Directories
ls --color ---Listing Directories in Color
Some of the default color settings include displaying directory names in blue,
text files in white, executable files in green, and links in turquoise.
Many systems are set up to use this flag by default, so that using ls
&nbs
相关文档:
1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI) 就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......
proc文件系统是一个伪文件系统,它只存在内存当中,而不占用外存空间。它以文件系统的方式为访问系统内核数据的操作提供接口。用户和应用程序可以通过proc得到系统的信息,并可以改变内核的某些参数。由于系统的信息,如进程,是动态改变的,所以用户或应用程序读取proc文件时,proc文件系统是动态从系统内核读出所需信息并 ......
linux下获取本机IP地址
方法一:
local_host="`hostname --fqdn`"
local_ip=`host $local_host | awk '{print $NF}'`
方法二:
/sbin/ifconfig |grep -Eo '\baddr:[^ \t]+' |grep -Eo '[0-9\.]+' |head -n1
......
用linux C 下的函数调用创建中文目录、文件等,字符串的编码格式要求是utf-8格式的。
比如想要使用 int mkdir(const char *pathname, mode_t mode); 创建一个中文的目录。那么pathname的编码格式要求是utf-8的,而不能是gb3212/gbk的,否则就是乱码。
那么如果linux C下如何进行gbk<---->utf-8编码转换的编码装换的 ......
Linux下也有回收站功能,但只在Gnome等桌面环境下面。在终端下面是用rm命令来删除文件,就是直接从硬盘上删除了。要是你一不小心删错了文件,
只能采用一些极其复杂的数据恢复工具来补救,而且还不一定有效。我就有过这样的经历,一不小心删错了文件,以致几天的工作成果立马灰飞烟灭。这样的事情发
生一次都太多了。我们 ......