Linux下增加磁盘设备的处理记录
--首先看看有哪些磁盘
[root@localhost ~]# fdisk -l
--要处理的是sdj,使用fdisk分区
[root@localhost ~]# fdisk /dev/sdj
The number of cylinders for this disk is set to 13054.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help):n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-13054, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-13054, default 13054):
Using default value 13054
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
Command (m for help):q
--这之间使用了n创建分区,p是主分区,最重要的是w,写入磁盘,不写的话,前面工作白费
--下面是使用ext3格式格式化sdj1
[root@localhost ~]# mkfs.ext3 /dev/sdj1
mke2fs 1.39
相关文档:
1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI) 就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......
Linux中tty、pty、pts的概念区别
基本概念:
1> tty(终端设备的统称):
tty一词源于Teletypes,或者teletypewriters,原来指的是电传打字机,是通过串行线用打印机键盘通过阅读和发送信息的东西,后来这东西被键盘与显示器取代,所以现在叫终端比较合适。
终端是一种字符型设备,它有多种类型,通常使用tty来简 ......
使用sudo可以在以非root用户登录时临时获得root权限,并执行需要的命令。
可以使用sudo的用户可以叫做sudoer。
添加sudoer的方法(假设您已经安装sudo):
执行
# visudo
或
# sudoedit
提示:
有些发行版的sudo提供了sudoedit,有的则提供了visudo,功能上基本是一样的。
你也可以使用其他编辑器如vi进行 ......
getenv(取得环境变量内容)
相关函数 putenv,setenv,unsetenv
表头文件 #include<stdlib.h>
定义函数 char * getenv(const char *name);
函数说明 getenv()用来取得参数name环境变量的内容。参数name为环境变量的名称,如果该变量存在则会返回 ......
高级 Linux 命令精通指南,第 3 部分:资源管理
作者:Arup Nanda
2009 年 1 月发表
在此部分中,了解用于监视物理组件的高级 Linux 命令
Linux 系统由若干主要物理组件组成,如 CPU、内存、网卡和存储设备。要有效地管理 Linux 环境,您应该能够以合理的精度测量这些资源的各种指标 — 每个组件处理多少资源、 ......