您的位置:首页 > 运维架构 > Linux

红帽 LINUX 6自学笔记第二章(2) …

2014-07-21 14:29 375 查看
文件管理

1.重定向

pwd > filename.txt

echo hello > filename.txt

2.复制

cp filea 空 fileb 复制文件a
将复制文件命名为b

cp file 空
/tmp
复制文件a 到/tmp目录

cp filaa 空 fileb /tmp 复制文件a
和 文件b 到目录/tmp

cp ~/webpage.html 从~ 主目录
复制文件 webpage.html 到当前目录

3.移动 重命名 mv

mv filea file b 重命名 文件a 为文件b

mv filea /tmp 复制文件至
/tmp文件架下

mv filea 空 fileb /tmp 将文件a
文件b 都复制到/tmp目录下

mv
~/webpage.html
从~主目录中移动文件 webpage.html 到当前目录

mv images
html cwd
是主目录,下面有连个子目录 ~/images 和 ~/html
。将images 移动到html目录下

4.用RM 命令 清楚(删除)文件

rm filea 删除filea

rm filea
fileb 同时删除filea和fileb

rm
~/photos.html
从主目录删除 photo.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: