首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

Linux CentOS删除或重命名文件夹和文件的办法

Linux、CentOS操作系统下如何删除和重命名文件夹呢?办法如下: 一、Linux、CentOS下重命名文件和文件夹 mv:move 用移动文件命令就可以了,因为linux系统没有专门的重命名命令。 基本格式: 移动文件:mv 文件名 移动目的地文件名 重命名文件:mv 文件名 修改后的文件名 示例:mv oldfilename newfilename (oldfilename为旧文件名,newfilename为新文件名) 二、Linux、CentOS下删除文件和文件夹 通常情况下,删除文件用:rm 文件名。删除文件夹用:rmdir 文件夹名。 但是rmdir不能删除非空的文件夹,那如何删除非空文件夹呢:命令:rm -rf 非空文件夹名; -r 就是向下递归,不管有多少级目录,一并删除。 -f 就是直接强行删除,不作任何提示的意思。 1、删除文件夹命令 rm -rf /var/log/httpd/access 将会删除/var/log/httpd/access目录以及其下所有文件、文件夹 2、删除文件命令 rm -f /var/log/httpd/access.log 将会强制删除/var/log/httpd/access.log这个文件 建议使用前做好备份,好像此命令是不会放到回收站的,删了就再也见不着下面的文件了。

01

puppet kick 报错返回值cod

环境: puppetserver端  RHEL5.8或者RHEL6.4 [root@puppetserver1 etc]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.8 (Tikanga) puppetagent端  RHEL5.8 和RHEL6.4 [root@agent3 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.4 (Santiago) [root@agent2 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.8 (Tikanga) [root@agent2 ~]# [root@agent3 ~]# 故障: puppetserver推送到RHEL6.4上OK,推送到RHEL5.8上报错,具体如下   关于agent端配置参考我的博客 http://dreamfire.blog.51cto.com/418026/1257718 操作: [root@puppetserver1 etc]# [root@puppetserver1 etc]# puppet kick -p 10 --host agent2.bsgchina.com失败 Triggering agent2.bsgchina.com Getting status status is running Host agent2.bsgchina.com is already running agent2.bsgchina.com finished with exit code 3 Failed: agent2.bsgchina.com [root@puppetserver1 etc]# puppet kick -p 10 --host agent3.bsgchina.com成功 Triggering agent3.bsgchina.com Getting status status is success agent3.bsgchina.com finished with exit code 0 Finished 日志: [root@agent3 ~]# puppet agent --server=puppetserver1.bsgchina.com --verbose --no-daemonize notice: Starting Puppet client version 2.7.21 info: Caching catalog for agent3.bsgchina.com info: Applying configuration version '1377075268' notice: Finished catalog run in 0.37 seconds info: access[^/catalog/([^/]+)$]: allowing 'method' find info: access[^/catalog/([^/]+)$]: allowing $1 access info: access[^/node/([^/]+)$]: allowing 'method' find info: access[^/node/([^/]+)$]: allowing $1 access info: access[/certificate_revocation_list/ca]: allowing 'method' find info: access[/certificate_revocation_list/ca]: allowing * access info: access[^/report/([^/]+)$]: allowing 'method' save info: access[^/report/([^/]+)$]: allowing $1 access info: access[/file]: allowing * access info: access[/certificate/ca]: adding authentication any info: access[/certificate/ca]: allowing 'method' find info: access[/certificate/ca]: allowing * access info: access[/certificate/]: adding authentication any info: access[/certificate/]: allowing 'method' find info:

01
领券