linux file and directory
2015-01-07 21:42
274 查看
1 how to close your computer?
step 1:sync
step 2:shutdown -h
step 3:reboot
step 4:halt(=showdown -h now +power off)
2 attribute of file
10 bits
1:type of file
2~4:user
5~7:group
8~10:others
3 chage group
eg:chagrp [group name][file name]
4 add a user's group
eg:groupadd
5 change user
chown[-R] counter file name/group name file name
where -R means all subfiles of current file
6 change authority of user's reading,writing and executing
eg:chmod[-R] xyz(means figure) file name
where the meaning of -R is as same as chown's
eg:chown u=rwx,og=rx test/test2
when add/minus some authorities,you can see that
eg:chown a-x test/test2
where u for user,o for others, g for group,a for all
7 umask value
eg:umask xxx
if you want to estabish a document,xxx's maximum is 777,
else common file 666
8 change special attribute of file
eg:chattr [+-=][ASaci][file or document name]
9 list special attributes of a file/document
eg:Isattr [-aR][file/document]
10 how to search a file
eg:which test
where test is a file
eg:whereis [-bmsu][file name]
eg:locate
if your system has not this command, you can download
packet mlocate by using command "yum install -y mlocate"
eg:find [path][para]
11 linux file types
eg: - for regular file
d for directory
l for link
b for block
c for seris device
s for socket
12 how to estabish hard links or symbolic links
eg:ln[-s][source file][dst file]
step 1:sync
step 2:shutdown -h
step 3:reboot
step 4:halt(=showdown -h now +power off)
2 attribute of file
10 bits
1:type of file
2~4:user
5~7:group
8~10:others
3 chage group
eg:chagrp [group name][file name]
4 add a user's group
eg:groupadd
5 change user
chown[-R] counter file name/group name file name
where -R means all subfiles of current file
6 change authority of user's reading,writing and executing
eg:chmod[-R] xyz(means figure) file name
where the meaning of -R is as same as chown's
eg:chown u=rwx,og=rx test/test2
when add/minus some authorities,you can see that
eg:chown a-x test/test2
where u for user,o for others, g for group,a for all
7 umask value
eg:umask xxx
if you want to estabish a document,xxx's maximum is 777,
else common file 666
8 change special attribute of file
eg:chattr [+-=][ASaci][file or document name]
9 list special attributes of a file/document
eg:Isattr [-aR][file/document]
10 how to search a file
eg:which test
where test is a file
eg:whereis [-bmsu][file name]
eg:locate
if your system has not this command, you can download
packet mlocate by using command "yum install -y mlocate"
eg:find [path][para]
11 linux file types
eg: - for regular file
d for directory
l for link
b for block
c for seris device
s for socket
12 how to estabish hard links or symbolic links
eg:ln[-s][source file][dst file]
相关文章推荐
- Get and display the size of file and directory in Linux system using du command 获取和现实linux文件大小(三)
- Linux System Programming note 8 ——File and Directory Management
- linux/unix rules for naming file and directory
- Linux System Programming note 8 ——File and Directory Management
- ubuntu 64bit arm-linux-gcc: No such file or directory 问题
- python库的学习系列之 10. File and Directory Access
- 在Linux中执行.sh脚本,异常/bin/sh^M: bad interpreter: No such file or directory。
- Manually and automatically mount windows file system on Linux
- Linux 格式化分区 报错Could not stat --- No such file or directory 和 partprobe 命令
- arm-none-linux-gnueabi-gcc: VERSION": No such file or directory
- Redhat Enterprise Linux securely mount remote Linux / UNIX directory or file system using SSHFS
- Linux中.sh脚本,异常/bin/sh^M: bad interpreter: No such file or directory
- Linux 格式化分区 报错Could not stat --- No such file or directory 和 partprobe 命令
- linux/errno.h: No such file or directory (kernel compile error)
- How To Get Application Path,And How To Get The Path's Directory,File Name,And Type Info(如何得到运行程序的路径,以及如何得到路径的文件夹,文件名,以及类型等等信息)
- UNIX/Linux下运行脚本文件出现bad interpreter:No such file or directory的原因和解决办法
- 在Linux中执行.sh脚本,异常/bin/sh^M: bad interpreter: No such file or directory。
- Linux sh脚本异常:bad interpreter: No such file or directory
- linux 脚本不执行,出现错误bad interpreter: No such file or directory
- LINUX下c/c++的学习(4)--linux file and direction(stat fstat lstat access umask chmod ...)