[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

https://cmdchallenge.com/ how far can you get? i'm stu

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 37
Thread images: 9

File: firefox_2017-08-25_21-23-40.png (23KB, 508x274px) Image search: [Google]
firefox_2017-08-25_21-23-40.png
23KB, 508x274px
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 accept
tr '\n' '+' < sum-me.txt | sed 's/+$//' | bc
>>
stuck on 2nd
>>
>>62090570
the absolute state of /g/
>>
File: 1473745464519.jpg (67KB, 680x1020px) Image search: [Google]
1473745464519.jpg
67KB, 680x1020px
test...
>>
>List names of all the files in the current directory, one file per line.
>>
>ls (multiple files per line) accepted
>>
connection error
>>
>>62091163
>>62091145
>>
File: .png (45KB, 1229x156px) Image search: [Google]
.png
45KB, 1229x156px
This is bullshit
>>
>>62090540
Just use awk
>>
File: 1486852434171.png (450KB, 1000x1000px) Image search: [Google]
1486852434171.png
450KB, 1000x1000px
>>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
>>
File: 452367436.jpg (20KB, 480x360px) Image search: [Google]
452367436.jpg
20KB, 480x360px
>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
>>
File: pooinloo.png (78KB, 1651x929px) Image search: [Google]
pooinloo.png
78KB, 1651x929px
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.
>>
>>62093124
>>>/trash/
>>
File: 1502702244553.jpg (45KB, 600x456px) Image search: [Google]
1502702244553.jpg
45KB, 600x456px
>>62090540
>tfw rm -rf * won't delete dotfiles
what the fuck
>>
File: hmmm.png (11KB, 927x176px) Image search: [Google]
hmmm.png
11KB, 927x176px
>>62090540
really makes me think
>>
File: 1503262232255.jpg (156KB, 1280x720px) Image search: [Google]
1503262232255.jpg
156KB, 1280x720px
#     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 works
grep GET a*

>but this doesn't
grep -n "GET" access.log
Thread posts: 37
Thread images: 9


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.