个人工具

UbuntuHelp:PowerUsersBasicCommands

来自Ubuntu中文

跳转至: 导航, 搜索

Basic commands you will need

Basics

These are basic commands you should learn to use well. To get more information about each one simply search the Unix manual pages by typing man followed by the filename at the shell prompt

  1. ls - list files

ex: ls -l filename

  1. cp - copy file1 to file2

ex: cp file1 file2

  1. mv - move file1 to file2 (Useful for renaming)

ex: mv file1 file2 1.

More advanced commands

Now for some cooler stuff, Here are some commands that are a little harder to use but are extremely useful. Some have pages explaining them in more details.

  1. grep - Allows you to search for a pattern in a file. Grep is more useful when it's used with regular expressions.

ex: grep "Nicolas" names.txt


/!\ Edit conflict - other version: ----
  1. find - You probably guess it. Find will find files for you. It can search for files using specific attributes such as its name, date of modification, size what ever.

/!\ Edit conflict - your version: ----
  1. find - You probably guess it. Find will find files for you. It can search for files using specific attributes such as its name, date of modification, size what ever.

/!\ End of edit conflict ----

ex: find ~/ -name test.txt -print

  1. sed
  2. awk
  3. ...