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

General Discussion

Deleted hello.txt in the Console course

Ok, I'm sure I'm not the only one to do this, right?

Just 'to see if it worked' I typed: rm hello.txt

It did work... sorry!

How do I get it back?

7 Answers

ive not done that course but know linux. I will have to take a guess here - where you doing a code challange when you did this and now you dont have the hello.txt file available to complete the complete it because you rm'd it? In real world linux then no you couldnt get it back (unless you had some kind of backup or shadow copy system setup with cron /rsynch). Im guessing though if you where using code challange and have this problem then the code challange is using html5 local storage - so you could maybe fix yu problem by using a different browser (i beleive local storage data is specific to the browser you used - seems that way from my tests. Maybe someone can confirm this) , or by clearing you local storage settings in your browser.

If Ive got the totally wrong end of the stick - sorry!

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

You can type this command

touch hello.txt

Thanks guys,

It seems the file is well and truly deleted. using touch does create a new file, but obviously it's empty.

I suppose I no longer need the file, just wondering if it's ever possible to 'restore' the original one.

Is my console session and associated storage linked to my Treehouse account?

Tom Ellis - You might benefit from a forum post I made when I first started using the Treehouse console:

  • You can run commands that can break your console
  • If you ever want to start over from scratch
    • delete the cookie for console.teamtreehouse.com
  • The Treehouse Console is an Amazon EC2 instance running Ubuntu

Thanks, James.

Jim Hoskins
STAFF
Jim Hoskins
Treehouse Guest Teacher

Hi, right now clearing your cookies doesn't delete your instance. If you really need it restored because you have broken it beyond your ability to repair, support can help you out.

If you have deleted your hello.txt and want it back, run the following command to restore it to your home directory.

curl -Lo ~/hello.txt http://trhou.se/console_hello

I've updated the episode notes to reflect this new option.

Great, thanks for the reply, Jim.