易截截图软件、单文件、免安装、纯绿色、仅160KB

linux下磁盘操作命令

查看系统的磁盘信息:
fdisk -l
[root@localhost home]# fdisk -l
Disk /dev/hda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 979 7759395 83 Linux
/dev/hda3 980 1044 522112+ 82 Linux swap
Disk /dev/hdb: 2147 MB, 2147483648 bytes
16 heads, 63 sectors/track, 4161 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 200 100768+ 83 Linux
/dev/hdb2 201 3100 1461600 83 Linux
/dev/hdb3 3101 4161 534744 82 Linux swap
[root@localhost home]#
 
分区:
fdisk
[root@localhost home]# fdisk /dev/hdb
The number of cylinders for this disk is set to 4161.
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):
 
创建文件系统:
mke2fs
交换分区格式化:
mkswap
[root@localhost home]# mkswap -v /dev/hdb3
mkswap: warning: truncating swap area to 133890kB
Setting up swapspace version 0, size = 133885 kB
 
设置标签:
e2label
Usage: e2label device [newlabel]
 
查看文件系统信息:
df
[root@localhost home]# df
Filesystem 1K-块 已用 可用 已用% 挂载点
/dev/hda2 7637400 5721608 1527824 79% /
/dev/hda1


相关文档:

linux使用技巧

我用到的Linux技巧 
1.linux上网:
使用root用户登陆使用 adsl-setup命令将配置ppp0
出现default就默认回车,采用默认设置
进入DNS information here:输入dns
最后使用 adsl-start 就可以用adsl方式上网了
2.uname -a - 看系统内核等信息
tar:把文件打包,不压缩:tar cvf *.tar dirName 解开:tar xvf *.tar ......

linux 0.11 内核学习 head.s


#
# 这段代码被连接到system模块的最前面,这也是它为什么称之为head.s的原因。
# 从这里开始内核完全运行在保护模式下。head.s采用的是at&t格式的
# 汇编。注意的是代码中的赋值方向是从左到右。

# 这段程序实际上是出于内存的绝对地址0开始处。首先是加载各个数据段寄存器。
# 重新设置全局描述符表g ......

linux 0.11 内核学习 block_dev.c


/*
 * 该文件的两个函数是为了向open和write函数提供接口,实现内核数据
 * 和用户数据的交互
 */
/*
 *  linux/fs/block_dev.c
 *
 *  (C) 1991  Linus Torvalds
 */
#include <errno.h>
#include <linux/sched.h>
#include <linux/kernel ......

linux 0.11 内核学习 fcntl.c


/*
 *  linux/fs/fcntl.c
 *
 *  (C) 1991  Linus Torvalds
 */
#include <string.h>
#include <errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <asm/segment.h>
#include <fcntl.h>
#include <sys/stat. ......

Java判断OS是linux还是windows

public class Test {
public static void main(String aa[]) {
if (System.getProperty("os.name").equals("Linux")) {
System.out.println("linux");
} else if (System.getProperty("os.name").equals("Windows XP")) {
System.out.println("win ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号