GithubHelp home page GithubHelp logo

md's People

Contributors

yan7 avatar

Watchers

 avatar  avatar

md's Issues

# ubuntu常用命令

  1. 打开文件管理器

nautilus

  1. 以管理员身份打开文件管理器

sudo nautilus

  1. 在文件管理器中打开文件、文件夹

nautilus file/folder

  1. 文件夹改名

mv filename filename

  1. 删除一个空文件夹

rmdir folder

  1. 创建一个空文件

touch file

  1. 删除一个非空目录下的一切

rm -rf

  1. 删除一个文件或者多个文件

rm file1 file2

  1. 返回当前工作目录的绝对路径

pwd

  1. 复制文件

cp dest1 dest2 將dest1的文件复制到dest2
cp folder/* dest 將folder下的所以文件(不含子文件夹中的文件)复制到dest中
cp -r folder dest 將folder下所有文件(包含子文件夹中欧给你的所有文件)复制到dest中

  1. 输出文件到终端

cat file

  1. 输出文件到终端并显示行号

cat -n file

ln

ln主要用于在两个文件中创建链接,链接又分为 Hard Links (硬链接)和 Symbolic Links (符号链接或软链接),其中默认为创建硬链接,使用 -s 参数指定创建软链接。

  • 硬链接主要是增加一个文件的链接数,只要该文件的链接数不为 0 ,该文件就不会被物理删除,所以删除一个具有多个硬链接数的文件,必须删除所有它的硬链接才可删除。
  • 软链接简单来说是为文件创建了一个类似快捷方式的东西,通过该链接可以访问文件,修改文件,但不会增加该文件的链接数,删除一个软链接并不会删除源文件,即使源文件被删除,软链接也存在,当重新创建一个同名的源文件,该软链接则指向新创建的文件。
  • 硬链接只可链接两个文件,不可链接目录,而软链接可链接目录,所以软链接是非常灵活的。

ln source dest ### 为 source 创建一个名为 dest 的硬链接

ln -s source dest ### 为 source 创建一个名为 dest 的软链接

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.