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

less hello.txt ~

I accidently typed less hello.txt ~ and ended up with this output

hello.txt (END).

I typed [q] to quit and get back to where I started but when I attempted less hello.txt I did not get the contents of the less command. I also managed to delete or move hello.txt from the documents directory. Please help, your assistance will be greatly appreciated

1 Answer

If you remove a file, it is permanently removed from memory and you can't undo... Sorry to say.

All I can say is you should be careful when using the Console on your local machine. You might delete important files, and unlike deleting files in your Finder/File Explorer, you can't retrieve the files back from the trash can. You should also be extra careful when you are root in the Console.

I understand that if a file is deleted it can delete files permanently on the computer I'm using. If I use the terminal setup in treehouse instead of Mac's terminal are the changes permanent on the Mac used?

If you do the same thing on a Mac's terminal it is also permanently deleted.