我要把一个文件夹下的所有文件*添加*一个扩展名 .txt,命令是什么?
--
您收到此邮件是因为您订阅了 Google 网上论坛的“Ubuntu China”论坛。
要向此网上论坛发帖,请发送电子邮件至 ubun...@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 ubuntu-cn+...@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/ubuntu-cn?hl=zh-CN 访问此网上论坛。
�����ÿ� said the following on 03/04/2010 06:37 PM http://weblog-wanglei.appspot.com/ д��:
加州旅客 said the following on 03/04/2010 06:37 PM http://weblog-wanglei.appspot.com/ 写道:
find . -exec mv {} {}.txt \;
嗯,多谢,可以,如何能够不给子目录添加扩展名 .txt 呢,并且在子目录下的文件也添加 .txt 呢?
加州旅客 said the following on 03/04/2010 06:37 PM http://weblog-wanglei.appspot.com/ 写道:
find . -exec mv {} {}.txt \;
--
您收到此邮件是因为您订阅了 Google 网上论坛的“Ubuntu China”论坛。
要向此网上论坛发帖,请发送电子邮件至 ubun...@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 ubuntu-cn+...@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/ubuntu-cn?hl=zh-CN 访问此网上论坛。
LarryG said the following on 03/04/2010 06:50 PM http://weblog-wanglei.appspot.com/ �:
�����ÿ� д��:
> �Ҷ��� ��find��
> shell�½����Ǹ��ļ��У�Ȼ�����룺
> find . -exec mv {} {}.txt \;
> ע������б�ܺͷֺŶ������١�
> �϶��и�õķ�������ţ�˽��
>
> �� 2010��3��4�� ����6:27��wanglei <bwan...@hotmail.com
> <mailto:bwan...@hotmail.com>>���
>
> ��Ҫ��һ���ļ����µ������ļ�*���*һ����չ�� .txt��������ʲô��
>
> --
> ���յ����ʼ�����Ϊ������ Google ������̳�ġ�Ubuntu China����̳��
> Ҫ���������̳�����뷢�͵����ʼ��� ubun...@googlegroups.com
> <mailto:ubun...@googlegroups.com>��
> Ҫȡ���Ĵ�������̳���뷢�͵����ʼ���
> ubuntu-cn+...@googlegroups.com
> <mailto:ubuntu-cn%2Bunsu...@googlegroups.com>��
> ���и�����⣬��ͨ��
> http://groups.google.com/group/ubuntu-cn?hl=zh-CN ���ʴ�������̳��
>
>
> --
> ���յ����ʼ�����Ϊ������ Google ������̳�ġ�Ubuntu China����̳��
> Ҫ���������̳�����뷢�͵����ʼ��� ubun...@googlegroups.com��
> Ҫȡ���Ĵ�������̳���뷢�͵����ʼ���
> ubuntu-cn+...@googlegroups.com��
> ���и�����⣬��ͨ�� http://groups.google.com/group/ubuntu-cn?hl=zh-CN
> ���ʴ�������̳��
wanglei <bwan...@gmail.com> write:
>find .-f * -exec mv {} {}.txt \; 多出一个空格,.-f 可以。
>
>LarryG said the following on 03/04/2010 06:50 PM http://weblog-
>> find . -f * -exec mv {} {}.txt \;
>
----
Jian Lee [ http://jianlee.ylinux.org ]