特殊:Badtitle/NS100:PowerUsersBasicCommands:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Wikibot留言 | 贡献
无编辑摘要
Wikibot留言 | 贡献
无编辑摘要
第16行: 第16行:
=== More advanced commands ===
=== More advanced commands ===
Now for some cooler stuff, Here are some commands that are a little harder to use but are extremly usefull. Some have pages explaining them in more details.
Now for some cooler stuff, Here are some commands that are a little harder to use but are extremly usefull. Some have pages explaining them in more details.
<ol><li>Self:grep - Allows you to search for a pattern in a file. Grep is more useful when it's used with regular expressions.</li></ol>
<ol><li>[[UbuntuHelp:grep]] - Allows you to search for a pattern in a file. Grep is more useful when it's used with regular expressions.</li></ol>


ex: grep "Nicolas" names.txt
ex: grep "Nicolas" names.txt
<ol><li>Self:find - You probably guess it. Find will find files for you. It can search for files using specific attributes such as it's name, date of modification, size what ever.</li></ol>
<ol><li>[[UbuntuHelp:find]] - You probably guess it. Find will find files for you. It can search for files using specific attributes such as it's name, date of modification, size what ever.</li></ol>


ex: find ~/ -name test.txt -print
ex: find ~/ -name test.txt -print
<ol><li>Self:sed
<ol><li>[[UbuntuHelp:sed]]
</li><li>Self:awk
</li><li>[[UbuntuHelp:awk]]
</li><li>...</li></ol>
</li><li>...</li></ol>



2008年10月19日 (日) 16:55的版本

{{#ifexist: :PowerUsersBasicCommands/zh | | {{#ifexist: PowerUsersBasicCommands/zh | | {{#ifeq: {{#titleparts:PowerUsersBasicCommands|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:PowerUsersBasicCommands|1|-1|}} | zh | | }}

Basic commands you will need

Basics

These are basic commmands 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 extremly usefull. Some have pages explaining them in more details.

  1. UbuntuHelp: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

  1. UbuntuHelp:find - You probably guess it. Find will find files for you. It can search for files using specific attributes such as it's name, date of modification, size what ever.

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

  1. UbuntuHelp:sed
  2. UbuntuHelp:awk
  3. ...