Linux下创建文件
试一试,其实很简单的。
mkdir -m 775 filename
-m : 设置文件的权限。直接设置,不需要默认权限。
[root@localhost home]# mkdir text1
[root@localhost home]# mkdir -m 777 text2
[root@localhost home]# ls -l
drwxr-xr-x 2 root root 4096 2010-1-19 08:03 text1
drwxrwxrwx 2 root root 4096 2010-1-19 08:04 text2
相关文档:
#
# 这段代码被连接到system模块的最前面,这也是它为什么称之为head.s的原因。
# 从这里开始内核完全运行在保护模式下。head.s采用的是at&t格式的
# 汇编。注意的是代码中的赋值方向是从左到右。
#
# 这段程序实际上是出于内存的绝对地址0开始处。首先是加载各个数据段寄存器。
# 重新设置全局描述符表g ......
/*
* linux/fs/bitmap.c
*
* (C) 1991 Linus Torvalds
*/
/* bitmap.c contains the code that handles the inode and block bitmaps */
#include <string.h>
#include <linux/sched.h>
#include <linux/kernel.h> // 一些内核常用函数的原形定义
......
/*
* 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. ......
查看系统的磁盘信息:
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 ......