Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1278632
  • 博文数量: 273
  • 博客积分: 5865
  • 博客等级: 准将
  • 技术积分: 3280
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-11 10:01
文章分类

全部博文(273)

文章存档

2015年(33)

2014年(11)

2013年(11)

2012年(136)

2011年(32)

2010年(50)

分类: LINUX

2013-01-31 15:02:07

   今天下载的源码里面C++源文件后缀都是.CPP,导致我的vim不能正确识别里面的关键字,当我改名为*.cpp(小写)后,就可以了。可是几百个文件不能以个一个改吧,于是找到了rename这个命令,下面是#man rename的内容:
RENAME(1)                  Linux Programmer’s Manual                 RENAME(1)

NAME
       rename - Rename files

SYNOPSIS
       rename from to file...
       rename -V

DESCRIPTION
       rename will rename the specified files by replacing the first occurrence of from in their name by to.

       -V, --version
              Display version information and exit.

       For example, given the files
              foo1, ..., foo9, foo10, ..., foo278, the commands

              rename foo foo0 foo?
              rename foo foo0 foo??

       will turn them into foo001, ..., foo009, foo010, ..., foo278.

       And
              rename .htm .html *.htm

       will fix the extension of your html files.

SEE ALSO
       mmv(1), mv(1)

AVAILABILITY
       The rename command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-
       linux-ng/.

                                1 January 2000                       RENAME(1)
可以看出使用这个命令完成这项工作是多么简单
接下来是我的做法:
# rename CPP cpp *CPP

 

 

 

在linux下以点开头命名的文件在系统中视为隐藏文件,例如 “.123 ”。用ls、ls -l或者ll是无法查看的。那么如何才能查看linux系统下的隐藏文件呢?下面介绍一下简单的查看方式。
               
 
                      1、#在命令行下使用ls -a

                        2、#在XWindow的KDE桌面中在"查看(View)"菜单里选"显示隐藏文件(Show Hidden Files)"就行了。


阅读(1952) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~