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

来自Ubuntu中文
跳到导航跳到搜索
Oneleaf留言 | 贡献
新页面: {{From|https://help.ubuntu.com/community/PowerUsersBasicCommands}} {{Languages|UbuntuHelp:PowerUsersBasicCommands}} == Basic commands you will need == === Basics === These are basic com...
 
Wikibot留言 | 贡献
无编辑摘要
 
(未显示同一用户的5个中间版本)
第2行: 第2行:
{{Languages|UbuntuHelp:PowerUsersBasicCommands}}
{{Languages|UbuntuHelp:PowerUsersBasicCommands}}
== Basic commands you will need ==
== Basic commands you will need ==
=== Basics ===
=== 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
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
<ol><li>ls - list files</li></ol>


* ls - list files
ex: ls -l filename  
ex: ls -l filename  
* cp - copy file1 to file2
<ol><li>cp - copy file1 to file2</li></ol>
 
ex: cp file1 file2
ex: cp file1 file2
* mv - move file1 to file2 (Useful for renaming)
<ol><li>mv - move file1 to file2 (Useful for renaming)</li></ol>
 
ex: mv file1 file2
ex: mv file1 file2
*
1.
=== 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 extremely useful. Some have pages explaining them in more details.
<ol><li>[[UbuntuHelp:grep|grep]] - Allows you to search for a pattern in a file. Grep is more useful when it's used with regular expressions.</li></ol>


* Self: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
ex: grep "Nicolas" names.txt
* 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.
---- /!\ '''Edit conflict - other version:''' ----
<ol><li>[[UbuntuHelp:find|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.</li></ol>
 
---- /!\ '''Edit conflict - your version:''' ----
<ol><li>[[UbuntuHelp:find|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.</li></ol>
 
---- /!\ '''End of edit conflict''' ----
ex: find ~/ -name test.txt -print
ex: find ~/ -name test.txt -print
* Self:sed
<ol><li>[[UbuntuHelp:sed|sed]]
* Self:awk
</li><li>[[UbuntuHelp:awk|awk]]
* ...
</li><li>...</li></ol>
 
----
----
[[category:CategoryDocumentation]]


[[category:UbuntuHelp]]
[[category:UbuntuHelp]]

2010年5月19日 (三) 23:57的最新版本

{{#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 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. ...