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 trialaniket roy barman5
4,390 PointsA little Confusion!
treehouse ~ $ ls documents hello.txt how_to_go_home.txt treehouse ~ $ less documents documents is a directory treehouse ~ $ less hello.txt hello.txt : no such file or directory
when i give 'ls documents' it shows me the files in it, that is there are two files hello.txt and how_to_go_home.txt . But when i give less 'hello.txt' it shows no such file exist. WHY ?
2 Answers
aniket roy barman5
4,390 Points i got my answer.
Gerald Wells
12,763 PointsI am assuming based off how you worded the question it is due to the file path... Just because you list the contents of a directory does not mean you are in that directory. You need to ensure you are in the correct branch of the tree before you attempt to manipulate/get the contents of a file or ensure you have the correct file path in the request.
aniket roy barman5
4,390 Pointsyes u r right....