User:Xenon dichloride/Terminal: Difference between revisions

From Infinite Nomic Wiki
No edit summary
No edit summary
Line 1: Line 1:
Terminal is a nomic taking place entirely within a filesystem. Actions are submitted as terminal commands.
Terminal is a nomic taking place entirely within a filesystem. Actions are submitted as terminal commands.
A line of code consists of a single command. A line without


{| class="wikitable"
{| class="wikitable"
Line 11: Line 13:
|make
|make
|mk {location or if blank: ~/} {name} {dir/file or if blank: file} {owner or if blank: you, if e or all: all players} {if file: contents as attached .txt file or code block}
|mk {location or if blank: ~/} {name} {dir/file or if blank: file} {owner or if blank: you, if e or all: all players} {if file: contents as attached .txt file or code block}
|Creates a file or directory at the specified location
|Creates a file or directory at the specified location.
|-
|-
|cp
|cp
|copy
|copy
|cp {name}
|cp {location} {location}
|
|Copies a file or directory from one location and places the copy in another location.
|-
|-
|mv
|mv
|move
|move
|
|mv {location} {location}
|
|Moves a file or directory to a new location.
|-
|-
|rm
|rm
|remove
|remove
|
|rm {location}
|
|Deletes a file or directory. A directory with contents not owned by the user cannot be deleted without sudo.
|-
|-
|nm
|nm
Line 32: Line 34:
|nm {location} {new name}
|nm {location} {new name}
|Changes the name of a file or directory.
|Changes the name of a file or directory.
|-
|ct
|cut
|
|
|-
|-
|et
|et
|edit
|edit
|
|et {file location} {write/append or w/a} {new contents attached as .txt file or code block}
|
|Changes the contents of a file.
|-
|-
|run
|run
Line 52: Line 49:
You cannot perform a command on a file or in a directory that you are not the owner of, unless you use sudo.
You cannot perform a command on a file or in a directory that you are not the owner of, unless you use sudo.


when a player joins, a file is created at ~/Players/ named {player name}. If that file already exists, isplayer is set to true. When a player ceases being a player, this is set to false. If a player or ex-player leaves the server, they are no longer a player and their file is removed. A player must be a member of the IN discord server.
A player must be a member of the IN discord server.
 
When a player joins, the following file is created at ~/Players/ named {player name}:
id: {discord id}
is_player = true
If that file already exists, is_player = true. When a player ceases being a player, is_player = false. If a player or ex-player leaves the server, they are no longer a player and their file is removed.

Revision as of 01:01, 6 January 2024

Terminal is a nomic taking place entirely within a filesystem. Actions are submitted as terminal commands.

A line of code consists of a single command. A line without

Command Alternative Syntax Description
mk make mk {location or if blank: ~/} {name} {dir/file or if blank: file} {owner or if blank: you, if e or all: all players} {if file: contents as attached .txt file or code block} Creates a file or directory at the specified location.
cp copy cp {location} {location} Copies a file or directory from one location and places the copy in another location.
mv move mv {location} {location} Moves a file or directory to a new location.
rm remove rm {location} Deletes a file or directory. A directory with contents not owned by the user cannot be deleted without sudo.
nm rename nm {location} {new name} Changes the name of a file or directory.
et edit et {file location} {write/append or w/a} {new contents attached as .txt file or code block} Changes the contents of a file.
run run {file name} Executes the code in a file.

sudo can be purchased, not always accessed

You cannot perform a command on a file or in a directory that you are not the owner of, unless you use sudo.

A player must be a member of the IN discord server.

When a player joins, the following file is created at ~/Players/ named {player name}:

id: {discord id}
is_player = true

If that file already exists, is_player = true. When a player ceases being a player, is_player = false. If a player or ex-player leaves the server, they are no longer a player and their file is removed.