https://cmdchallenge.com/
how far can you get?
i'm stuck on sum all numbers in a file because for some reason it won't accepttr '\n' '+' < sum-me.txt | sed 's/+$//' | bc
stuck on 2nd
>>62090570
the absolute state of /g/
test...
>List names of all the files in the current directory, one file per line.
>ls (multiple files per line) accepted
connection error
This is bullshit
>>62090540
Just use awk
>>62090540# There is a file named "access.log" in the
# current directory. Print the contents.
#
bash(0)> more access.log
::::::::::::::
access.log
::::::::::::::
163.56.115.58 - - [09/Jan/2017:22:29:57 +0100] "GET /posts/2/display HTTP/1.0" 200 3240
75.113.188.234 - - [09/Jan/2017:22:30:43 +0100] "GET /posts/foo?appID=xxxx HTTP/1.0" [...]
200.19.168.148 - - [09/Jan/2017:22:57:11 +0100] "GET /posts/foo?appID=xxxx HTTP/1.0" 200 3471
bash(0)> cat access.log
163.56.115.58 - - [09/Jan/2017:22:29:57 +0100] "GET /posts/2/display HTTP/1.0" 200 3240
75.113.188.234 - - [09/Jan/2017:22:30:43 +0100] "GET /posts/foo?appID=xxxx HTTP/1.0" [...]
200.19.168.148 - - [09/Jan/2017:22:57:11 +0100] "GET /posts/foo?appID=xxxx HTTP/1.0" 200 3471
# Correct!
# You have a new challenge!
# Print the last 5 lines of "access.log".
#
bash(0)>
>cat is the correct way to print file contents
>>62091425
to be fair, it probably expected a perfect copy of it in stdout, dumb weeb.
dd worked for example.
>>62091443
>using dd to pring file contents
>>62091321
I don't like awk
>>62090540
This is funny desu
>>62091317
first probably has extra space at the end
>bash
wheres the powershell test site?
>>62093124
shit.com
>print numbers from 1 to 100 separated by space
jot -s ' ' 100
>command jot not found
what a shit
What's a good tutorial to learn the ins and outs of the command line? I don't want to learn bash scripting, just to be able to do a lot of shit with the terminal without having to look it up
Right now I only know the most basic commands
Get fucked# Print all files in the current directory,
# one per line (not the path, just the filename)
# that contain the string "500".
#
bash(0)> grep 500 * | cut -d ':' -f 1
README
access.log
access.log
access.log.1
bash(0)>
I know grep has a flag for it but I don't remember that shit off the top of my head
R8 my solution
>>62095840
Very nice.
Try to include the c preprocessor next time.
>>62095125
seconded
>>62095125
Protip: if you don't know what a command does, you can usually get a summary with $cmd --help or $cmd -h
>>62090570
same, I set up an alias called "path" and "fullpath" and never bothered to even look at it. This was 4 years ago and I do not know what the real command is.
>>62095969
pwd
>>62090540
still stuck at ricing it
>>62095954
Yeah but I'd like some sort of short course that teaches me to use most commands, especially file/text manipulation commands and networking stuff. As of right now I only know the most basic directory navigation and file manipulation stuff, I can't do any troubleshooting.
>>62096063
I can't recommend any in particular, I learned by finding things I needed done and doing them.
I'd also look for CTFs--servers designed to teach you pentesting. They usually have a beginner course that's all about file manipulation.
>>62095993
Yeah looked up my alias and know it again. But hey, thank you too anon.
>>62095840
>https://cmdchallenge.com/
that font and colors combination is so hard on the eyes.
>>62090540
>tfw rm -rf * won't delete dotfiles
what the fuck
>>62090540
really makes me think
# Correct!
# You have a new challenge!
# Print all files in the current directory,
# one per line (not the path, just the filename)
# that contain the string "500".
#not ls -a | grep "500" ?????
onegai
>>62090540
>yfw this worksgrep GET a*
>but this doesn'tgrep -n "GET" access.log