html command_line_obstacle_course.html
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html command_line_obstacle_course.html相关的知识,希望对你有一定的参考价值。
<!-- Move into the repo directory -->
$ cd workspace/CLI-Obstacle-Course/
Caroline-iMac@Carolines-iMac(1.41) 8:57:20pm ~/workspace/CLI-Obstacle-Course
<!-- View the directories and files that are created-->
$ ls
Gemfile config lib
Gemfile.lock config.ru log
README.rdoc db public
Rakefile delete_me script
animals_controller.rb doc test
app images vendor
Caroline-iMac@Carolines-iMac(1.56) 9:03:08pm ~/workspace/CLI-Obstacle-Course
<!-- View all the files with time stamp and owner permissions (including hidden files)-->
$ ls -lh -a
total 88
drwxr-xr-x 22 Caroline-iMac staff 748B Feb 12 21:06 .
drwxr-xr-x 5 Caroline-iMac staff 170B Feb 12 20:49 ..
-rw-r--r-- 1 Caroline-iMac staff 6.0K Feb 12 20:49 .DS_Store
drwxr-xr-x 11 Caroline-iMac staff 374B Feb 12 20:49 .git
-rw-r--r-- 1 Caroline-iMac staff 430B Feb 12 20:49 .gitignore
-rw-r--r-- 1 Caroline-iMac staff 862B Feb 12 20:49 Gemfile
-rw-r--r-- 1 Caroline-iMac staff 2.9K Feb 12 20:49 Gemfile.lock
-rw-r--r-- 1 Caroline-iMac staff 9.0K Feb 12 20:49 README.rdoc
-rw-r--r-- 1 Caroline-iMac staff 281B Feb 12 20:49 Rakefile
-rw-r--r-- 1 Caroline-iMac staff 52B Feb 12 20:49 animals_controller.rb
drwxr-xr-x 8 Caroline-iMac staff 272B Feb 12 20:49 app
drwxr-xr-x 10 Caroline-iMac staff 340B Feb 12 20:49 config
-rw-r--r-- 1 Caroline-iMac staff 166B Feb 12 20:49 config.ru
drwxr-xr-x 4 Caroline-iMac staff 136B Feb 12 20:49 db
drwxr-xr-x 3 Caroline-iMac staff 102B Feb 12 20:49 delete_me
drwxr-xr-x 3 Caroline-iMac staff 102B Feb 12 20:49 doc
drwxr-xr-x 4 Caroline-iMac staff 136B Feb 12 20:49 lib
drwxr-xr-x 3 Caroline-iMac staff 102B Feb 12 20:49 log
drwxr-xr-x 8 Caroline-iMac staff 272B Feb 12 20:49 public
drwxr-xr-x 3 Caroline-iMac staff 102B Feb 12 20:49 script
drwxr-xr-x 8 Caroline-iMac staff 272B Feb 12 20:49 test
drwxr-xr-x 4 Caroline-iMac staff 136B Feb 12 20:49 vendor
Caroline-iMac@Carolines-iMac(1.57) 9:03:22pm ~/workspace/CLI-Obstacle-Course
<!-- Move the images directory into the app/assets directory, and list its contents including hidden files. -->
$ mv images app/assets
Caroline-iMac@Carolines-iMac(1.71) 9:06:27pm ~/workspace/CLI-Obstacle-Course
$ cd app/assets
Caroline-iMac@Carolines-iMac(1.77) 9:09:42pm ~/workspace/CLI-Obstacle-Course/app/assets
$ ls -a
. .. images javascripts stylesheets
Caroline-iMac@Carolines-iMac(1.77) 9:09:44pm ~/workspace/CLI-Obstacle-Course/app/assets
<!-- Also viewed the file with their time stamp, owner, and permissions -->
$ ls -lh -a
total 0
drwxr-xr-x 5 Caroline-iMac staff 170B Feb 12 21:06 .
drwxr-xr-x 8 Caroline-iMac staff 272B Feb 12 20:49 ..
drwxr-xr-x 3 Caroline-iMac staff 102B Feb 12 20:49 images
drwxr-xr-x 9 Caroline-iMac staff 306B Feb 12 20:49 javascripts
drwxr-xr-x 9 Caroline-iMac staff 306B Feb 12 20:49 stylesheets
Caroline-iMac@Carolines-iMac(1.79) 9:09:51pm ~/workspace/CLI-Obstacle-Course/app/assets
<!-- Go into the app directory then into the views directory then into the static_pages directory. -->
$ cd ..
Caroline-iMac@Carolines-iMac(2.45) 9:13:45pm ~/workspace/CLI-Obstacle-Course/app
$ cd views/static_pages
Caroline-iMac@Carolines-iMac(2.38) 9:13:53pm ~/workspace/CLI-Obstacle-Course/app/views/static_pages
<!-- View the files in that directory. Without changing directory, view the files in the parent directory. View the files in the parents parent directory. -->
$ ls
new.html.erb this_is_the_annoying_ping_pong_text!.txt
Caroline-iMac@Carolines-iMac(2.38) 9:13:56pm ~/workspace/CLI-Obstacle-Course/app/views/static_pages
$ ls ..
animals this_is.txt
cars this_is_the.txt
layouts this_is_the_annoying.txt
people this_is_the_annoying_ping.txt
schools this_is_the_annoying_ping_pong.txt
static_pages this_is_the_annoying_ping_pong_text-2.txt
this.txt where_am_i?.txt
Caroline-iMac@Carolines-iMac(1.94) 9:14:49pm ~/workspace/CLI-Obstacle-Course/app/views/static_pages
$ ls ../..
assets controllers helpers mailers models views
Caroline-iMac@Carolines-iMac(1.80) 9:15:01pm ~/workspace/CLI-Obstacle-Course/app/views/static_pages
<!-- Move the file this_is_the_annoying_ping_pong_text!.txt into the parent directory -->
$ mv this_is_the_annoying_ping_pong_text\!.txt ..
Caroline-iMac@Carolines-iMac(1.91) 9:15:44pm ~/workspace/CLI-Obstacle-Course/app/views/static_pages
<!-- Now without changing directories, move it back to views/static_pages/ -->
$ mv ../this_is_the_annoying_ping_pong_text\!.txt .
Caroline-iMac@Carolines-iMac(1.69) 9:18:39pm ~/workspace/CLI-Obstacle-Course/app/views/static_pages
<!-- Change the file's name to where_am_you?.txt, then change the name to where_am_i?.txt -->
$ mv this_is_the_annoying_ping_pong_text\!.txt where_am_you\?.txt
Caroline-iMac@Carolines-iMac(1.72) 9:23:02pm ~/workspace/CLI-Obstacle-Course/app/views/static_pages
$ mv where_am_you\?.txt where_am_i\?.txt
Caroline-iMac@Carolines-iMac(2.15) 9:24:08pm ~/workspace/CLI-Obstacle-Course/app/views/static_pages
<!-- View your working directory path. -->
$ pwd
/Users/Caroline-iMac/workspace/CLI-Obstacle-Course/app/views/static_pages
Caroline-iMac@Carolines-iMac(2.06) 9:24:34pm ~/workspace/CLI-Obstacle-Course/app/views/static_pages
<!-- Copy the working directory path into where_am_i?.txt -->
$ pwd > where_am_i\?.txt
Caroline-iMac@Carolines-iMac(1.70) 9:25:53pm ~/workspace/CLI-Obstacle-Course/app/views/static_pages
<!-- Go back to the home directory using one command. -->
$ cd ~/workspace/CLI-Obstacle-Course/
Caroline-iMac@Carolines-iMac(1.77) 9:27:29pm ~/workspace/CLI-Obstacle-Course
<!-- Find the file named with static_pages_controller.rb -->
$ find . -name 'static_pages_controller.rb'
./app/helpers/static_pages_controller.rb
Caroline-iMac@Carolines-iMac(1.75) 9:39:18pm ~/workspace/CLI-Obstacle-Course
<!-- View all the filenames that have controller in the title. -->
$ find . -name '*controller*'
./animals_controller.rb
./app/assets/javascripts/people_controller.rb
./app/controllers
./app/controllers/application_controller.rb
./app/helpers/static_pages_controller.rb
./app/mailers/schools_controller.rb
./app/models/cars_controller.rb
./test/functional/animals_controller_test.rb
./test/functional/cars_controller_test.rb
./test/functional/people_controller_test.rb
./test/functional/schools_controller_test.rb
./test/functional/static_pages_controller_test.rb
Caroline-iMac@Carolines-iMac(1.47) 9:40:36pm ~/workspace/CLI-Obstacle-Course
<!-- Find the file that has the bootinator method in it -->
$ grep -r 'bootinator' *
app/assets/stylesheets/application_helper.rb: def bootinator(name)
app/views/animals/new.html.erb:<p>Then the distressed file said <%= bootinator("you") %> </p>
app/views/cars/new.html.erb:<p>Then the distressed file said <%= bootinator("you") %> </p>
app/views/people/new.html.erb:<p>Then the distressed file said <%= bootinator("you") %> </p>
app/views/schools/new.html.erb:<p>Then the distressed file said <%= bootinator("you") %> </p>
app/views/static_pages/new.html.erb:<p>Then the distressed file said <%= bootinator("you") %> </p>
Caroline-iMac@Carolines-iMac(2.34) 9:52:26pm ~/workspace/CLI-Obstacle-Course
<!-- Move that file into the app/helpers/ directory -->
$ mv app/assets/stylesheets/application_helper.rb app/helpers/
Caroline-iMac@Carolines-iMac(2.29) 9:55:09pm ~/workspace/CLI-Obstacle-Course
<!-- Delete the directory delete_me/ from the main directory (including all its contents. careful!). -->
$ rm -rf delete_me
Caroline-iMac@Carolines-iMac(1.71) 9:57:59pm ~/workspace/CLI-Obstacle-Course
<!-- Find a ruby file whose title ends with the text winning.rb -->
$ find . -name '*winning.rb'
./config/environments/you_are_winning.rb
Caroline-iMac@Carolines-iMac(2.31) 9:59:50pm ~/workspace/CLI-Obstacle-Course
<!-- Copy that file to your home directory, and go to your home directory. -->
$ mv ./config/environments/you_are_winning.rb ~
Caroline-iMac@Carolines-iMac(1.99) 10:00:54pm ~/workspace/CLI-Obstacle-Course
$ cd ~
Caroline-iMac@Carolines-iMac(2.15) 10:01:08pm ~
<!-- Run the file using the ruby command. -->
$ ruby you_are_winning.rb
your secret instructions are:
put all the CLI commands you used for this challenge into a new gist and submit it!
hint: try using a bash command to list all previous commands!
Caroline-iMac@Carolines-iMac(2.45) 10:01:18pm ~
362 cd workspace/CLI-Obstacle-Course/
363 ls
364 ls -atime
365 ls -lh
366 mv images app/assets
367 ls
368 ls -lh -a
369 cd app/assets
370 ls -a
371 ls -lh -a
372 ..app/views
373 ../views
374 ../app/views/static_pages
375 ../views/static_pages
376 ..views/static_pages
377 cd ..views/static_pages
378 cd ../app/views/static_pages
379 cd ..app/views/static_pages
380 cd ..views/static_pages
381 cd ..
382 cd views/static_pages
383 ls
384 ls ..
385 ls ../..
386 mv this_is_the_annoying_ping_pong_text\!.txt ..
387 mv ../this_is_the_annoying_ping_pong_text\!.txt .
388 mv this_is_the_annoying_ping_pong_text\!.txt where_am_you\?.txt
389 mv where_am_you\?.txt where_am_i\?.txt
390 pwd
391 pwd > where_am_i\?.txt
392 cd
393 cd ~/workspace/CLI-Obstacle-Course/
394 find -name "static_pages_controller.rb"
395 find
396 grep static_pages_controller.rb
397 grep -r static_pages_controller.rb
398 dir static_pages_controller.rb /s /p
399 find ~ -name 'static_pages_controller.rb'
400 find . -name 'static_pages_controller.rb'
401 find . -name '*controller*'
402 grep -r 'bootinator'
403 grep -r 'bootinator' *
404 grep -r 'studytrax' *
405 mv app/assets/stylesheets/application_helper.rb app/helpers/
406 rmdir -rf delete_me/
407 rm -rf delete_me
408 find . -name '*winning.rb'
409 mv ./config/environments/you_are_winning.rb ~
410 ~
411 cd ~
412 ruby you_are_winning.rb
413 history
Caroline-iMac@Carolines-iMac(1.91) 10:03:29pm ~
以上是关于html command_line_obstacle_course.html的主要内容,如果未能解决你的问题,请参考以下文章