Difference between revisions of "CraftOS Shell"

From ComputerCraft Wiki
Jump to: navigation, search
(Added a new table for manipulating and moving files/directories)
(Reformatted + added: paint, chat, set, wget, commands, exec)
(24 intermediate revisions by 10 users not shown)
Line 1: Line 1:
If you're familliar with *NIX-like OSes, then this should be very easy. But this guide can still come in handy.
+
== Regular Shell Commands ==
  
First of all: navigating.
+
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
{| class="wikitable"
+
<tr><td colspan="3" 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;
!  Command
+
CraftOS Shell Programs
!  Aliases
+
</td></tr>
!  Description
+
<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><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Version Added</td></tr>
!  Example
+
 
|-
+
<div id="cmd-alias">
|  ls
+
{{API table/row
| dir
+
|[[alias]]<br><tt>alias <alias> <program></tt>
| '''L'''i'''s'''ts all files and folders in a directory
+
|Maps an alias string to a program.
| <pre>ls</pre>
+
|1.2
|-
+
|odd}}
| cd
+
</div>
 +
 
 +
<div id="cmd-apis">
 +
{{API table/row
 +
|[[apis]]<br><tt>apis</tt>
 +
|Lists all loaded APIs.
 +
|1.2
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-bg">
 +
{{API table/row
 +
|[[bg]]<br><tt>bg <program> <arguments></tt>
 +
|Opens the specified script in a new [[multishell]] tab.
 +
|1.6
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-cd">
 +
{{API table/row
 +
|[[cd]]<br><tt>cd <path></tt>
 +
|Changes to the specified directory
 
|
 
|
| Changes the '''c'''urrent '''d'''irectory
+
|}}
| <pre>cd /disk</pre>
+
</div>
|}
+
 
Manipulating folders and files
+
<div id="cmd-chat">
{| class="wikitable"
+
{{API table/row
|-
+
|[[chat]]<br><tt>chat host <hostname></tt>, <tt>chat join <hostname> <nickname></tt>
!  Command
+
|Peer-to-peer rednet-based messaging software.
!  Aliases
+
|1.6
!  Description
+
|odd}}
!  Example
+
</div>
|-
+
 
| mkdir
+
<div id="cmd-clear">
|
+
{{API table/row
| '''M'''akes a '''dir'''ectory
+
|[[clear]]<br><tt>clear</tt>
| <pre>mkdir /exampleDirectory</pre>
+
|Clears the terminal.
|-
+
|
| copy
+
|}}
| cp
+
</div>
| '''C'''o'''p'''ies a file or folder to another directory
+
 
| <pre>cp /toCopy /targetLocation</pre>
+
<div id="cmd-copy">
|-
+
{{API table/row
| delete
+
|[[copy]]<br><tt>copy <source> <destination></tt>
|
+
|Copies a source file or folder to a destination
| '''Delete'''s a file or folder
+
|1.2
| <pre>delete /pathToDelte</pre>
+
|odd}}
|}
+
</div>
 +
 
 +
<div id="cmd-delete">
 +
{{API table/row
 +
|[[delete]]<br><tt>delete <path></tt>
 +
|Deletes the specified file (in the same manner as [[rm]]).
 +
|1.2
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-dj">
 +
{{API table/row
 +
|[[dj]]<br><tt>dj</tt>
 +
|Music box DJ - use <tt>dj</tt> for help.
 +
|1.2
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-drive">
 +
{{API table/row
 +
|[[drive]]<br><tt>drive</tt>, <tt>drive <path></tt>
 +
|Lists the mount location of the current directory, or the path specified.
 +
|1.2
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-edit">
 +
{{API table/row
 +
|[[edit]]<br><tt>edit <path></tt>
 +
|Edits the file specified.
 +
|
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-eject">
 +
{{API table/row
 +
|[[eject]]<br><tt>eject <side></tt>
 +
|Ejects the disk on the side specified.
 +
|1.2
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-exit">
 +
{{API table/row
 +
|[[exit]]<br><tt>exit</tt>
 +
|Exits the currently running shell session - if it is the only shell session, the computer will power off.
 +
|
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-fg">
 +
{{API table/row
 +
|[[fg]]<br><tt>fg <program> <arguments></tt>
 +
|Opens the specified script in a new [[multishell]] tab, then switches to it.
 +
|1.6
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-gps">
 +
{{API table/row
 +
|[[Gps (program)|gps]]<br><tt>gps <?></tt>
 +
|Minecraft Global Positioning tool. Use <tt>gps</tt> for help.
 +
|1.31
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-help">
 +
{{API table/row
 +
|[[help]]<br><tt>help</tt>, <tt>help <topic></tt>
 +
|Help utility. Opens the specified topic, or the introduction if no topic is specified.
 +
|
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-id">
 +
{{API table/row
 +
|[[id]]<br><tt>id</tt>, <tt>id <side></tt>
 +
|Returns the ID of the computer, or if a side is specified, the ID of the disk in the specified side.
 +
|1.2
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-label">
 +
{{API table/row
 +
|[[label]]<br><tt>label</tt>
 +
|Gets and sets the ID of the computer, or, the ID of a disk in a specified side. Use <tt>label</tt> for help.
 +
|1.2
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-list">
 +
{{API table/row
 +
|[[list]]<br><tt>list</tt>, <tt>list <path></tt>
 +
|Lists the content of the current directory, or, the directory specified.
 +
|1.2
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-lua">
 +
{{API table/row
 +
|[[lua]]<br><tt>lua</tt>
 +
|Interactive Lua interpreter at the shell.
 +
|
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-mkdir">
 +
{{API table/row
 +
|[[mkdir]]<br><tt>mkdir <path></tt>
 +
|Makes the directory at the path specified.
 +
|
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-monitor">
 +
{{API table/row
 +
|[[Monitor (program)|monitor]]<br><tt>monitor <side> <program> <arguments></tt>
 +
|Redirects a specified program to a monitor on the specified side.
 +
|1.31
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-move">
 +
{{API table/row
 +
|[[move]]<br><tt>move <source> <destination></tt>
 +
|Moves a file or folder at a specified source path to the specified destination path.
 +
|1.2
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-multishell">
 +
{{API table/row
 +
|[[multishell]]<br><tt>multishell</tt>
 +
|Opens a new instance of multishell, running within the ''current'' multishell session.
 +
|1.6
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-paint">
 +
{{API table/row
 +
|[[paint]]<br><tt>paint <path></tt>
 +
|Edits the image specified.
 +
|1.45
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-pastebin">
 +
{{API table/row
 +
|[[Pastebin_(program)|pastebin]]<br><tt>pastebin <get/run/put> <pastebin code/file></tt>
 +
|Allows the user to either retrieve a file from [http://pastebin.com/ pastebin.com], run it directly after downloading, or upload a file from the computer/turtle.
 +
|1.31
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-peripherals">
 +
{{API table/row
 +
|[[peripherals_(program)|peripherals]]<br><tt>peripherals</tt>
 +
|Lists all peripherals attacked to the system.
 +
|1.76
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-programs">
 +
{{API table/row
 +
|[[programs]]<br><tt>programs</tt>
 +
|Lists all programs on the system.
 +
|
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-reboot">
 +
{{API table/row
 +
|[[reboot]]<br><tt>reboot</tt>
 +
|Reboots the Computer.
 +
|1.2
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-redstone">
 +
{{API table/row
 +
|[[redstone (program)|redstone]]<br><tt>redstone <?></tt>
 +
|Controls the redstone output state(s) of the system.
 +
|1.6
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-repeat">
 +
{{API table/row
 +
|[[repeat]]<br><tt>repeat</tt>
 +
|Configures the system to act as a [[rednet (API)|rednet]] repeater.
 +
|1.6
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-rename">
 +
{{API table/row
 +
|[[rename]]<br><tt>rename <old-name> <new-name></tt>
 +
|Renames a file or directory.
 +
|1.2
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-rm">
 +
{{API table/row
 +
|[[rm]]<br><tt>rm <path></tt>
 +
|Deletes the specified file (in the same manner as [[delete]]).
 +
|
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-set">
 +
{{API table/row
 +
|[[set]]<br><tt>set <env variable> <value></tt>
 +
|Changes system settings.
 +
|1.77
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-shell">
 +
{{API table/row
 +
|[[shell]]<br><tt>shell, shell <program> <arguments></tt>
 +
|Opens another shell session. Runs a program if specified.
 +
|
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-shutdown">
 +
{{API table/row
 +
|[[shutdown]]<br><tt>shutdown</tt>
 +
|Powers off the Computer.
 +
|
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-time">
 +
{{API table/row
 +
|[[time]]<br><tt>time</tt>
 +
|Returns the Minecraft time of day.
 +
|1.2
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-type">
 +
{{API table/row
 +
|[[type]]<br><tt>type <path></tt>
 +
|Returns the type of the object or file at the specified path.
 +
|
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-wget">
 +
{{API table/row
 +
|[[wget]]<br><tt>wget <url> <filename></tt>
 +
|Fetches the content at the specified web address and saves it to the specified file.
 +
|1.77
 +
|odd}}
 +
</div>
 +
 
 +
</table><br><br>
 +
 
 +
== Turtle-specific Commands ==
 +
 
 +
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
 +
<tr><td colspan="3" 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;
 +
Additional TurtleOS 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><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Version Added</td></tr>
 +
 
 +
<div id="cmd-craft">
 +
{{API table/row
 +
|[[craft]]<br><tt>craft</tt>
 +
|The turtle will, if it is able, craft an item from the contents of its inventory.
 +
|1.4
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-dance">
 +
{{API table/row
 +
|[[dance]]<br><tt>dance</tt>
 +
|Initiates "get down" procedure.
 +
|1.3
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-equip">
 +
{{API table/row
 +
|[[equip]]<br><tt>equip <side></tt>
 +
|The turtle will attempt to place a tool on its specified side.
 +
|1.6
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-excavate">
 +
{{API table/row
 +
|[[excavate]]<br><tt>excavate <width></tt>
 +
|Digs a square-shaped quarry to bedrock, of width equal to that specified.
 +
|1.3
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-go">
 +
{{API table/row
 +
|[[go]]<br><tt>go <?></tt>
 +
|Moves the turtle.
 +
|1.3
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-refuel">
 +
{{API table/row
 +
|[[refuel]]<br><tt>refuel <amount></tt>
 +
|Attempts to replenish the turtle's [[fuel]] supply with items from its inventory.
 +
|1.4
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-tunnel">
 +
{{API table/row
 +
|[[tunnel]]<br><tt>tunnel <width></tt>
 +
|Digs a horizontal tunnel leading off in the direction the turtle is facing.
 +
|1.3
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-turn">
 +
{{API table/row
 +
|[[turn]]<br><tt>turn <?></tt>
 +
|Causes the turtle to rotate.
 +
|1.3
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-unequip">
 +
{{API table/row
 +
|[[unequip]]<br><tt>unequip<width></tt>
 +
|Attempts to remove a tool from the turtle's specified side.
 +
|1.6
 +
|odd}}
 +
</div>
 +
 
 +
</table><br><br>
 +
 
 +
== Command Computer-specific Commands ==
 +
 
 +
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
 +
<tr><td colspan="3" 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;
 +
Additional Command Computer 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><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Version Added</td></tr>
 +
 
 +
<div id="cmd-commands">
 +
{{API table/row
 +
|[[commands]]<br><tt>commands</tt>
 +
|Lists all commands available to the [[Command Computer]] under the current version of Minecraft.
 +
|1.7
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-exec">
 +
{{API table/row
 +
|[[exec]]<br><tt>exec <command></tt>
 +
|Executes the specified [http://minecraft.gamepedia.com/Commands operator command] as if through a Command Block.
 +
|1.7
 +
|}}
 +
</div>
 +
 
 +
</table><br><br>
 +
 
 +
== Removed Commands ==
 +
 
 +
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
 +
<tr><td colspan="3" 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;
 +
Removed Commands
 +
</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><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Version Removed</td></tr>
 +
 
 +
<div id="cmd-redprobe">
 +
{{API table/row
 +
|[[redprobe]]<br><tt>redprobe</tt>
 +
|List redstone stats.
 +
|1.6
 +
|odd}}
 +
</div>
 +
 
 +
<div id="cmd-redpulse">
 +
{{API table/row
 +
|[[redpulse]]<br><tt>redpulse</tt>
 +
|Redstone output pulse tool. Use <tt>redpulse</tt> for help.
 +
|1.6
 +
|}}
 +
</div>
 +
 
 +
<div id="cmd-redset">
 +
{{API table/row
 +
|[[redset]]<br><tt>redset</tt>
 +
|Redstone output set tool. Use <tt>redset</tt> for help.
 +
|1.6
 +
|odd}}
 +
</div>
 +
 
 +
</table><br><br>
 +
 
 +
== See Also ==
 +
* [[Built In Turtle Programs]]
 +
 
 +
[[Category:Programs]][[Category:Lists]][[Category:Tutorials]]

Revision as of 03:20, 11 June 2016

Regular Shell Commands

Grid disk.png   CraftOS Shell Programs

Program NameDescriptionVersion Added
alias
alias <alias> <program>
Maps an alias string to a program. 1.2
apis
apis
Lists all loaded APIs. 1.2
bg
bg <program> <arguments>
Opens the specified script in a new multishell tab. 1.6
cd
cd <path>
Changes to the specified directory
chat
chat host <hostname>, chat join <hostname> <nickname>
Peer-to-peer rednet-based messaging software. 1.6
clear
clear
Clears the terminal.
copy
copy <source> <destination>
Copies a source file or folder to a destination 1.2
delete
delete <path>
Deletes the specified file (in the same manner as rm). 1.2
dj
dj
Music box DJ - use dj for help. 1.2
drive
drive, drive <path>
Lists the mount location of the current directory, or the path specified. 1.2
edit
edit <path>
Edits the file specified.
eject
eject <side>
Ejects the disk on the side specified. 1.2
exit
exit
Exits the currently running shell session - if it is the only shell session, the computer will power off.
fg
fg <program> <arguments>
Opens the specified script in a new multishell tab, then switches to it. 1.6
gps
gps <?>
Minecraft Global Positioning tool. Use gps for help. 1.31
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. 1.2
label
label
Gets and sets the ID of the computer, or, the ID of a disk in a specified side. Use label for help. 1.2
list
list, list <path>
Lists the content of the current directory, or, the directory specified. 1.2
lua
lua
Interactive Lua interpreter at the shell.
mkdir
mkdir <path>
Makes the directory at the path specified.
monitor
monitor <side> <program> <arguments>
Redirects a specified program to a monitor on the specified side. 1.31
move
move <source> <destination>
Moves a file or folder at a specified source path to the specified destination path. 1.2
multishell
multishell
Opens a new instance of multishell, running within the current multishell session. 1.6
paint
paint <path>
Edits the image specified. 1.45
pastebin
pastebin <get/run/put> <pastebin code/file>
Allows the user to either retrieve a file from pastebin.com, run it directly after downloading, or upload a file from the computer/turtle. 1.31
peripherals
peripherals
Lists all peripherals attacked to the system. 1.76
programs
programs
Lists all programs on the system.
reboot
reboot
Reboots the Computer. 1.2
redstone
redstone <?>
Controls the redstone output state(s) of the system. 1.6
repeat
repeat
Configures the system to act as a rednet repeater. 1.6
rename
rename <old-name> <new-name>
Renames a file or directory. 1.2
rm
rm <path>
Deletes the specified file (in the same manner as delete).
set
set <env variable> <value>
Changes system settings. 1.77
shell
shell, shell <program> <arguments>
Opens another shell session. Runs a program if specified.
shutdown
shutdown
Powers off the Computer.
time
time
Returns the Minecraft time of day. 1.2
type
type <path>
Returns the type of the object or file at the specified path.
wget
wget <url> <filename>
Fetches the content at the specified web address and saves it to the specified file. 1.77


Turtle-specific Commands

Grid disk.png   Additional TurtleOS Shell Programs

Program NameDescriptionVersion Added
craft
craft
The turtle will, if it is able, craft an item from the contents of its inventory. 1.4
dance
dance
Initiates "get down" procedure. 1.3
equip
equip <side>
The turtle will attempt to place a tool on its specified side. 1.6
excavate
excavate <width>
Digs a square-shaped quarry to bedrock, of width equal to that specified. 1.3
go
go <?>
Moves the turtle. 1.3
refuel
refuel <amount>
Attempts to replenish the turtle's fuel supply with items from its inventory. 1.4
tunnel
tunnel <width>
Digs a horizontal tunnel leading off in the direction the turtle is facing. 1.3
turn
turn <?>
Causes the turtle to rotate. 1.3
unequip
unequip<width>
Attempts to remove a tool from the turtle's specified side. 1.6


Command Computer-specific Commands

Grid disk.png   Additional Command Computer Programs

Program NameDescriptionVersion Added
commands
commands
Lists all commands available to the Command Computer under the current version of Minecraft. 1.7
exec
exec <command>
Executes the specified operator command as if through a Command Block. 1.7


Removed Commands

Grid disk.png   Removed Commands

Program NameDescriptionVersion Removed
redprobe
redprobe
List redstone stats. 1.6
redpulse
redpulse
Redstone output pulse tool. Use redpulse for help. 1.6
redset
redset
Redstone output set tool. Use redset for help. 1.6


See Also