Hacknet

Hacknet

View Stats:
How to move back wth console commands
So, I'm habing an issue with moving back a space in the path i've taken, which is making the naix mission impossible.

Just to clarify my problem, if I go and inspect the /sys directory, I can't get back to the list of directories using the cd command

I try stuff like cd up like the tutorial says, but it doesnt work. Can anyone tell me what im doing wrong?
< >
Showing 1-5 of 5 comments
Raincloud Man Sep 8, 2015 @ 12:19pm 
Cd ..
It takes you out of a directory and back into the directory that directory is in.
I actually don't remember if there's another command that does the same thing in the linux shell, I just know that that one works in modern unix systems and I learned it from dos.

Remember that there's a blank space between, it's cd *space* ..
TwinShadow Sep 8, 2015 @ 12:32pm 
I do a bit of minor work in Fedora and oone of my servers uses Ubuntu. Most commands are the same throughout Unix and Linux boxes with different package systems (like aptitude for Debian-based systems, RPM for Red Hat. Not sure on other distros)

Basic commands can be found in this guide.

The only difference between this game and a standard Unix shell would probably be the mv command. And even then its real minor.

Under normal circumstances, in a shell, one could use mv some_file.ext ../some/dir to move that file one folder down, and into a separate folder, keeping the filename as-is. In the game, this is not the case. You actually have to type it entirely or you get some.. weird things going on. Nothing game breaking though.

Example:

cd home/ mv Clock.exe ../sys

Unfortunately, it will not move the file to the /sys directory. Instead, it'll just move and rename the file to sys in the root folder. Instead, one would have to provide a full path:

mv Clock.exe ../sys/Clock.exe

This will move it to where you want. Its a very minor thing, not sure if its a limitation in the game code or what, but I'm not going to fret over it.
Last edited by TwinShadow; Sep 8, 2015 @ 12:34pm
Moderator Abuse Sep 8, 2015 @ 1:20pm 
Some of the syntax and function is little tarded.
AlexMBrennan Sep 8, 2015 @ 1:54pm 
"cd /" should work too (in the game and IRL).

"/" (pronounced "root") is the root of the filesystem. A single "." specifies the current directory (e.g. used when you want to execute a script in the current folder by running ./evil.script), and ".." specifies the parent of the current directory (unless the current directory is "/", in which its parent is also "/"). In theory you could chain these together but there is usually not much point - e.g. cat ./../././.././etc/passwd will probably work


Most commands are the same throughout Unix and Linux boxes with different package systems (like aptitude for Debian-based systems, RPM for Red Hat. Not sure on other distros)
[...]
mv Clock.exe ../sys
The most important difference is that commands are generally not nearly as user-friendly IRL - for example, mv will happily overwrite files without warning whereas Hacknet automatically creates index.html(1) if index.html already exists. Aliases can be used to make commands ask for verification but you should never count on this being the case.

<arcane>
It's a bad idea to omit the trailing slash - the command will work, but it's behaviour will depend on whether /sys exists and whether it is a directory; when you later try to call /sys/clock.exe it will fail (because sys is a binary file and not a directory) - you might end up repeatedly overwriting a file instead of moving ten files into a different directory. Specifiying "mv clock.exe /sys/" avoids this problem.
</arcane>

not sure if its a limitation in the game code or what, but I'm not going to fret over it.
It's a result of the game, unlike real filesystems, allowing you to have multiple files with identical names.
Last edited by AlexMBrennan; Sep 8, 2015 @ 1:57pm
Bitch Puddin' Sep 8, 2015 @ 2:15pm 
thanks for your help!
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Sep 8, 2015 @ 12:08pm
Posts: 5