[game] Commands role play - Community & Forums Related Discussions

Users browsing this thread: 1 Guest(s)
josuah
Long time nixers
I propose a new forum game:

Most of us may use an unix system daily, and use the same commands over and again. For <code>ls</code>, I expect a list of directories and files, for <code>uname -A</code>, I expect some detailled name of the system.

I propose this: post commands, running them against an imaginary UNIX system, and imagine the output ourself. Just like a role-play where each would write in turn:

1. the output of the previous command.
2. the next command to execute.

Very simple example: Just after logging in:

<hr/>
Post 1

Code:
$ pwd

<hr/>
Post 2

Code:
Linux
Code:
$ pwd

<hr/>
Post 3

Code:
/z/j/o/strawberries
Code:
$ tac .bash_history | sed 10q

<hr/>

And so on and so on...

It should be rather easy at first, as we can "cheat" and have a look at our own system, but even if we do that, we may all have different systems in different states, and the challenge would then be to keep cohesion and keep the state of the system in mind.


(Optional roleplay) Wrote:At the end of the day, no more work ahead, I came to next street coffe before coming home, waiting for my friend to join me here in about an hour. That was a rather old place, with a lot of things stacked in all corners, a glittering light caught my eyes. It was the blinking carret of a screen: a terminal. Why would it be there? I had to check. No one seemed to pay attention, so I came and grabbed the keyboard. Nothing on screen, but the mere prompt:

Code:
$

P.S.: I have no prefered formatting, as long as it is readable and that we have fun!
Edit: It still would be better to tell whih command we are reffering to, to keep track of what is done.
neeasade
Grey Hair Nixers
This looks like fun -- as there was no initial command, I'm assuming I'll start with just that.

Code:
$ bash | rev
thlst
Members
Code:
[user@localhost ~]

Code:
ls | wc -l
pranomostro
Long time nixers
Wew, having a difficult start.

Result:

Code:
segamI
cisuM
soediV
o4m.m.p857x323 | kečiČ jovalS ,secaps htiw emanoediv gnol oot yttihS
ia
otsrk

Next code, a lot easier:
Code:
pwd

Edit: Okay, this has become obsolete now.
fuyuki
Registered
Code:
pwd

result:

Code:
resu/emoh/~:tsoh@resu;0]

next:

Code:
rev .bashrc

edit: this was intentional, lets make up a fake (hopefully interesting) bashrc
josuah
Long time nixers
There are multiple responses to thlst, so I propose to continue by quoting the command we are "answering" to.
neeasade
Grey Hair Nixers
okie.

(15-04-2016, 02:11 PM)fuyuki Wrote: next:

Code:
rev .bashrc

Code:
#    h t t p : /  / n i x e r s . n e t
#
# ▀▀▀▀██▄ ▀▀▀▀▀ ▀▀▀ ███  ▀▀▀██▄ ▀▀▀▀██▄  ▀▀▀██▄
# ░░░ ███  ░░░  ░░░ ███ ░░░ ███ ░░░ ███ ░░░ ███
# ▒▒▒ ███  ▒▒▒  ▒▒▒ ███ ▒▒▒     ▒▒▒ ███ ▒▒▒
# ▓▓▓ ███  ▓▓▓  ▀▓▓▄██▀ ▓▓▓▄▄   ▓▓▓▄██▀ ▀▓▓▄▄▄
# ███ ███  ███  ███ ███ ███     ███ ███     ███
# ███ ███  ███  ███ ███ ███     ███ ███     ███
# ███ ███  ███  ███ ███ ███     ███ ███     ███
# ███ ███  ███  ███ ███ ███ ███ ███ ███ ███ ███
# ███ ███  ███  ███ ███ ███ ███ ███ ███ ███ ███
# ███ ███  ███  ███ ███ ███ ███ ███ ███ ███ ███
# ███ ███  ███  ███ ███ ███ ███ ███ ███ ███ ███
# ▀▀▀ ▀▀▀ ▀▀▀▀▀ ▀▀▀ ▀▀▀  ▀▀▀▀▀  ▀▀▀ ▀▀▀  ▀▀▀▀▀
#   i r c . u n i x . c h a t  #  n i x e r s
#

prompt='$ '


let's get outta rev hell, folks.

Code:
[user@localhost ~] exit
josuah
Long time nixers
Nice! the srexin ASCII logo from orex!

(15-04-2016, 02:19 PM)neeasade Wrote: [user@localhost ~] exit

Code:
exit

In a NIXU system, there is always a 'de' command.

Code:
$ ed $(ls -a | head -1)

EDIT: To make it match with the output of pranomostro, I had to add <code>-a</code> to <code>ls</code> as <code>ed</code> does not edit directories.
josuah
Long time nixers
Code:
bash: ed: command not found

It is really sad, but my Arch does not hav <code>ed</code> by default.

Which shameful system is it?

Code:
uname -a
josuah
Long time nixers
(16-04-2016, 08:36 AM)sshbio Wrote: uname -a

Code:
You have mail in /home/user/mail/INBOX

Linux Aboriginal 1.4.4 #1 SMP Tue Nov 3 16:39:03 UTC 2015 x86_64 GNU/Linux

Damn! Aboriginal with toybox, so no <code>ed</code>, but <code>rev, wc -l, ls -a pwd</code> works.

What if <code>/bin/bash</code> is a symlink pointing to <code>/bin/sh</code>? I've alwasy seen this symlink in the other direction.

(15-04-2016, 02:03 PM)pranomostro Wrote: o4m.m.p857x323 | kečiČ jovalS ,secaps htiw emanoediv gnol oot yttihS

Loled at the title. Is it him? https://fr.wikipedia.org/wiki/Slavoj_%C5%BDi%C5%BEek


Build time!

Code:
cd $(dirname $(find / -name Makefile | sed -n 2p)) && make
pranomostro
Long time nixers
>Loled at the title. Is it him?
Yes, it is. I just needed a name with non-ASCII characters.
And I find he is quite interesting.

Code:
cd $(dirnam $(find / -name Makefile | sed -n 2p)) && make

Code:
{A lot of output by a C compiler, it seems}

A few hours later:

Code:
#wow, that takes a long time to compile!
#is that a kernel?
^C
make -B >/dev/null &; pwd
josuah
Long time nixers
(18-04-2016, 09:35 AM)pranomostro Wrote: make -B >/dev/null &; pwd

Code:
/usr/src/lunix


Code:
$ grep -r torvalds

Linus are you here !?
venam
Administrators
(18-04-2016, 09:10 PM)sshbio Wrote:
Code:
$ grep -r torvalds

Weirdly only one file popped up...
Code:
readme.md:Let's hope torvalds doesn't find this!

Code:
> cd && netstat -tulpen
josuah
Long time nixers
Ah! I'm stuck! I need to learn about networking, and this is the occasion to get started.

(20-04-2016, 01:07 AM)venam Wrote: cd && netstat -tulpen

So I'll go with this:

Code:
Active Internet connections
Proto   Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp          0      1  servs.ssh              me.straight-ho.243     ESTABLISHED
tcp          0      0  0.0.0.0:22             0.0.0.0:*              LISTEN      1928/sshd
tcp          0      0  :::22                  :::*                   LISTEN      1928/sshd
udp          0      0  0.0.0.0:5353           0.0.0.0:*                          18300/plugins
udp          0      0  127.0.0.1:323          0.0.0.0:*                          1872/chronyd
udp          0      0  ::1:323                :::*                               1872/chronyd

It's interesting, now I'll try to back it up so that I can study it elsewhere. How will I do this...

Code:
$ sudo^U mount
venam
Administrators
Code:
$ sudo mount

This replied
Code:
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=1337)

Let's try this...maybe there's an intruder:
Code:
> lastlog
josuah
Long time nixers
(27-04-2016, 12:45 AM)venam Wrote: > lastlog

Code:
Username         Port     From             Latest
root             tty1                      Tue May  3 03:00:27 +0200 2016
daemon                                     **Never logged in**
bin                                        **Never logged in**
sys                                        **Never logged in**
sync                                       **Never logged in**
man                                        **Never logged in**
lp                                         **Never logged in**
mail                                       **Never logged in**
news                                       **Never logged in**
uucp                                       **Never logged in**
proxy                                      **Never logged in**
www-data                                   **Never logged in**
backup                                     **Never logged in**
list                                       **Never logged in**
irc                                        **Never logged in**
nobody                                     **Never logged in**
systemd-timesync                           **Never logged in**
systemd-network                            **Never logged in**
systemd-resolve                            **Never logged in**
systemd-bus-proxy                           **Never logged in**
syslog                                     **Never logged in**
messagebus                                 **Never logged in**
uuidd                                      **Never logged in**
ntp                                        **Never logged in**
colord                                     **Never logged in**
dnsmasq                                    **Never logged in**
kernoops                                   **Never logged in**
user             tty1                      Tue May  3 07:18:14 +0200 2016
postfix                                    **Never logged in**
bkdr             tty2                      Mon Jan  1 00:00:00 +0000 1970

Wait what? A very old user?

Code:
> sed -n /bkdr/ /etc/passwd