Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Introduction to the Terminal Directories and Files Shortcuts and Wildcards

Pui Lun Christin C Hebron
Pui Lun Christin C Hebron
5,693 Points

Fill in the blank to complete a command that will change directly to the images subdirectory within the user's home dire

Fill in the blank to complete a command that will change directly to the images subdirectory within the user's home directory. Use the ~ symbol to stand for the home directory.

treehouse:~/workspace/games/macpan$ ls ~
documents  images  games
treehouse:~/workspace/games/macpan$ cd 

Not exactly understanding this?

6 Answers

rydavim
rydavim
18,814 Points

So, they've put you in a directory that is not the home directory. The goal is to navigate back to the home (~) directory, and then to the images folder. You can do this in one step by chaining ~/directory1/directory2/etc. In this case, you can assume that images is a direct sub-folder of home.

Hopefully that helps, but let me know if you still have questions. Happy programming!

~/images

the answer is ~

My thinking was you're trying to access the images directory from home directory so it would be ~/images

Billy Cheng
Billy Cheng
2,120 Points

Can somebody please let me know why the answer: ~/images is not ~/images/ ????

Either will work. The trailing / is optional.

Nicholas Prober
Nicholas Prober
4,925 Points

Because the / at the end is not needed.