Difference between revisions of "CraftOS Shell"

From ComputerCraft Wiki
Jump to: navigation, search
m (Added to CAT:Lists & CAT:Tutorials)
(Updated - the almighty list of everything CraftOS shell.)
Line 1: Line 1:
These commands are similar to *NIX-like OSes, but this guide is handy when using the shell.
+
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
 +
<tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;">
 +
[[File:Grid_disk.png|24px]]&nbsp;&nbsp;
 +
CraftOS Shell Programs
 +
</td></tr>
 +
<tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Program Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr>
  
Navigation:
+
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">alias<br /><tt>alias <alias> <program></tt></td>
{| class="wikitable"
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Maps an alias string to a program.</td></tr>
|-
+
!  Command
+
!  Aliases
+
!  Description
+
!  Example
+
|-
+
|  list
+
|  ls, dir
+
|  '''List'''s all files and folders in a directory
+
|  <pre>ls</pre>
+
|-
+
|  cd
+
|
+
|  Changes the '''c'''urrent '''d'''irectory
+
<pre>cd /disk</pre>
+
|}
+
Manipulating folders and files:
+
{| class="wikitable"
+
|-
+
!  Command
+
!  Aliases
+
!  Description
+
!  Example
+
|-
+
|  mkdir
+
+
|  '''M'''a'''k'''es a '''dir'''ectory
+
<pre>mkdir /exampleDirectory</pre>
+
|-
+
|  copy
+
|  cp
+
|  '''C'''o'''p'''ies a file or folder to another directory
+
|  <pre>cp /toCopy /targetLocation</pre>
+
|-
+
|  delete
+
|  rm
+
|  '''Delete'''s a file or folder
+
<pre>delete /pathToDelete</pre>
+
|}
+
  
[[Category:Lists]][[Category:Tutorials]]
+
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">apis<br /><tt>apis</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Lists all loaded APIs.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">cd<br /><tt>cd <path></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Changes to the specified directory</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">clear<br /><tt>clear</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Clears the terminal.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">copy<br /><tt>copy <source> <destination></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Copies a source file or folder to a destination</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">dj<br /><tt>dj</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Music box DJ - use <tt>dj</tt> for help.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">drive<br /><tt>drive</tt>, <tt>drive <path></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Lists the mount location of the current directory, or the path specified.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">edit<br /><tt>edit <path></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Edits the file specified.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">eject<br /><tt>eject <side></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Ejects the disk on the side specified.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">exit<br /><tt>exit</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Exits the currently running shell session - if it is the only shell session, the computer will power off.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">gps<br /><tt>gps</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Minecraft Global Positioning tool. Use <tt>gps</tt> for help.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">help<br /><tt>help</tt>, <tt>help <topic></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Help utility. Opens the specified topic, or the introduction if no topic is specified.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">id<br /><tt>id</tt>, <tt>id <side></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the ID of the computer, or if a side is specified, the ID of the disk in the specified side.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">label<br /><tt>label</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Gets and sets the ID of the computer, or, the ID of a disk in a specified side. Use <tt>label</tt> for help.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">list<br /><tt>list</tt>, <tt>list <path></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Lists the content of the current directory, or, the directory specified.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">lua<br /><tt>lua</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Interactive Lua interpreter at the shell.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">mkdir<br /><tt>mkdir <path></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Makes the directory at the path specified.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">monitor<br /><tt>monitor</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Redirects a specified program to a monitor on the specified side.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">move<br /><tt>move <source> <destination></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Moves a file or folder at a specified source path to the specififed destination path.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">programs<br /><tt>programs</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Lists all programs on the system.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">reboot<br /><tt>reboot</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Reboots the Computer.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">redprobe<br /><tt>redprobe</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">List redstone stats.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">redpulse<br /><tt>redpulse</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Redstone output pulse tool. Use <tt>redpulse</tt> for help.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">redset<br /><tt>redset</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Redstone output set tool. Use <tt>redset</tt> for help.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">time<br /><tt>time</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the Minecraft time of day.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">type<br /><tt>type <path></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the type of the object or file at the specified path.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">rename<br /><tt>rename <old-name> <new-name></tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Renames a file or directory.</td></tr>
 +
 
 +
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">shell<br /><tt>shell</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Opens another shell session.</td></tr>
 +
 
 +
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">shutdown<br /><tt>shutdown</tt></td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Powers off the Computer.</td></tr>
 +
</table>
 +
[[Category:Programs]][[Category:Lists]][[Category:Tutorials]]

Revision as of 13:15, 25 January 2013

Grid disk.png   CraftOS Shell Programs

Program NameDescription
alias
alias <alias> <program>
Maps an alias string to a program.
apis
apis
Lists all loaded APIs.
cd
cd <path>
Changes to the specified directory
clear
clear
Clears the terminal.
copy
copy <source> <destination>
Copies a source file or folder to a destination
dj
dj
Music box DJ - use dj for help.
drive
drive, drive <path>
Lists the mount location of the current directory, or the path specified.
edit
edit <path>
Edits the file specified.
eject
eject <side>
Ejects the disk on the side specified.
exit
exit
Exits the currently running shell session - if it is the only shell session, the computer will power off.
gps
gps
Minecraft Global Positioning tool. Use gps for help.
help
help, help <topic>
Help utility. Opens the specified topic, or the introduction if no topic is specified.
id
id, id <side>
Returns the ID of the computer, or if a side is specified, the ID of the disk in the specified side.
label
label
Gets and sets the ID of the computer, or, the ID of a disk in a specified side. Use label for help.
list
list, list <path>
Lists the content of the current directory, or, the directory specified.
lua
lua
Interactive Lua interpreter at the shell.
mkdir
mkdir <path>
Makes the directory at the path specified.
monitor
monitor
Redirects a specified program to a monitor on the specified side.
move
move <source> <destination>
Moves a file or folder at a specified source path to the specififed destination path.
programs
programs
Lists all programs on the system.
reboot
reboot
Reboots the Computer.
redprobe
redprobe
List redstone stats.
redpulse
redpulse
Redstone output pulse tool. Use redpulse for help.
redset
redset
Redstone output set tool. Use redset for help.
time
time
Returns the Minecraft time of day.
type
type <path>
Returns the type of the object or file at the specified path.
rename
rename <old-name> <new-name>
Renames a file or directory.
shell
shell
Opens another shell session.
shutdown
shutdown
Powers off the Computer.