如何使用linux服务器

这篇文章将为大家详细讲解有关如何使用linux服务器,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

1.linux删除文件出现rm: cannot remove ‘njinfi.com/public/.user.ini’: Operation not permitted

原因:
进入到`.user.ini'所在目录,执行一下 lsattr -a,查看文件下下边包含文件的属性,看到`.user.ini'有个'i'属性,代表不得任意更动文件或目录
解决方法:
chattr -i .user.ini
去除掉此属性,然后我们再执行删除,就可以顺利删除掉了

2.压缩文件夹报错:-bash: zip: command not found

原因:
压缩命令没有找到
解决方法:
yum install -y unzip zip

3.fatal: No remote repository specified.  Please, specify either a URL or a remote name from which new revisions should be fetched.

原因:
本地没有添加远程仓库映射
解决方法:
git remote add origin [git项目路径]

关于如何使用linux服务器就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。