linux常用指令

  • ls
  • list
  • ln -s 建立软链接
  • unlink xxx 或 rm xxx 删除软链接
  • rm -rf /root/xx 删除文件夹并向下渗透
  • rm -f /root/logs/game/nohup.log 强制删除文件
  • pip install xx -i https://pypi.tuna.tsinghua.edu.cn/simple
  • pip install xx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
  • git clone
  • find . -name xxx 以当前目录为根目录找文件
  • find / -name httpd.conf  #在根目录下查找文件httpd.conf,表示在整个硬盘查找
  • find /etc -name httpd.conf  #在/etc目录下文件httpd.conf
  • find /etc -name 'srm'  #使用通配符*(0或者任意多个)。表示在/etc目录下查找文件名中含有字符串‘srm’的文件
  • tar -cvf filename.tar path1 path2 #打包目录成tar包
    • c 建立一个压缩,打包文档; v 显示压缩或者打包的内容; f 指定文件名
  • tar -cvf filename.tar file1 file2
  • python -m torch.utils.collect_env
posted @ 2023-03-02 15:51  不要肥宅  阅读(18)  评论(0)    收藏  举报