Linux文件管理-文件处理
2014-09-16 08:46
316 查看
文件处理命令:touch
[root@localhost test2]# touch avnvyou.list
[root@localhost test2]# ls -l
总用量 0
-rw-r--r--. 1 root root 0 9月 16 08:22 avnvyou.list
[root@localhost test2]# pwd
/tmp/test2
[root@localhost test2]# touch /tmp/test2/avnvyou2.list
[root@localhost test2]# ls -l
总用量 0
-rw-r--r--. 1 root root 0 9月 16 08:23 avnvyou2.list
-rw-r--r--. 1 root root 0 9月 16 08:22 avnvyou.list
[root@localhost test2]# #不建议文件名中使用空格
[root@localhost test2]# touch "progarm files"
[root@localhost test2]# ls -l
总用量 0
-rw-r--r--. 1 root root 0 9月 16 08:23 avnvyou2.list
-rw-r--r--. 1 root root 0 9月 16 08:22 avnvyou.list
-rw-r--r--. 1 root root 0 9月 16 08:25 progarm files
[root@localhost test2]#
文件处理命令:cat
文件处理命令:tac
[root@localhost test2]# cat /etc/issue
[root@localhost test2]# cat /etc/issue
CentOS release 6.4 (Final)
Kernel \r on an \m
[root@localhost test2]# cat -n /etc/issue
1 CentOS release 6.4 (Final)
2 Kernel \r on an \m
3
[root@localhost test2]# tac /etc/issue
Kernel \r on an \m
CentOS release 6.4 (Final)
文件处理命令:more
文件处理命令:less
在 less时 可以输入/ 输入内容 做搜索 按 n选择下一个搜索到的内容
文件处理命令:head
[root@localhost test2]# head -10 /etc/services
# /etc/services:
# $Id: services,v 1.48 2009/11/11 14:32:31 ovasik Exp $
#
# Network services, Internet style
# IANA services version: last updated 2009-11-10
#
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, most entries here have two entries
# even if the protocol doesn't support UDP operations.
# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). Not all ports
文件处理命令:tail
[root@localhost test2]# tail -10 /etc/services
nimgtw 48003/udp # Nimbus Gateway
3gpp-cbsp 48049/tcp # 3GPP Cell Broadcast Service Protocol
isnetserv 48128/tcp # Image Systems Network Services
isnetserv 48128/udp # Image Systems Network Services
blp5 48129/tcp # Bloomberg locator
blp5 48129/udp # Bloomberg locator
com-bardac-dw 48556/tcp # com-bardac-dw
com-bardac-dw 48556/udp # com-bardac-dw
iqobject 48619/tcp # iqobject
iqobject 48619/udp # iqobject
相关文章推荐
- 一个文件处理中的小问题
- abap-文件处理的例子
- C# 断点续传 上传、下载文件处理
- Perl 文件处理备忘录
- Python——文件处理
- 学习Linux六(Linux必学60个命令之【文件处理】)
- VC++ MFC 文件处理unicode
- php 文件处理
- Linux基础学习(3)--Linux文件处理命令
- 《Python基础教程》 第六章 文件处理笔记
- Linux-文件处理命令-find;mv
- python 文件处理
- 6. linux文件处理的有用工具
- C语言文件处理-对图片取模数据的转换
- linux学习笔记----文件处理命令--head= 显示文件前几行内容
- PHP 文件处理方法
- Linux文件管理
- Python进阶01 文件处理
- Linux文件管理
- Linux文件管理(二)