New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using nano to create empty file #585

Open
brooksph opened this Issue Jun 20, 2017 · 5 comments

Comments

Projects
None yet
6 participants
@brooksph
Contributor

brooksph commented Jun 20, 2017

Under the section "Let’s re-create that file and then move up one directory to /Users/nelle/Desktop/data-shell" you're instructed to use nano to create a file named draft.txt. The next step uses ls to list the files in the directory. No instructions are provided for exiting nano and because the no text is added to file it is not saved.

@marwahaha

This comment has been minimized.

Contributor

marwahaha commented Jun 28, 2017

Hmm. So in this section:
image

It wouldn't hurt to add a graphic showing the nano screen, and adding some text, and then the commands to quit. Or, we could add a comment after nano draft.txt saying (make sure the learners enter text in the file, and close the file with Ctrl-X, then y, then Enter.

@gdevenyi

This comment has been minimized.

Contributor

gdevenyi commented Aug 3, 2017

Hi, contributions of this type are welcome to enhance the lesson.

@reshamas

This comment has been minimized.

Contributor

reshamas commented Aug 14, 2017

@marwahaha @gdevenyi
Would it be easier to introduce touch command and create a blank file?

@aliceminotto

This comment has been minimized.

aliceminotto commented Nov 3, 2017

I tend to agree with @reshamas, I've always used touch a lot to create placeholder files I was going to write in later. I think it would also make way easier to show examples or giving some small exercises during the lecture (e.g. moving, renaming and copying files, or even show some wildcard behaviour later on). There's no need to explain about the access and modification time neither in my opinion.

@scttfrdmn

This comment has been minimized.

scttfrdmn commented Aug 18, 2018

While the suggestion to introduce touch appears to have been addressed through #606 the original issue remains unresolved. I just stumbled through this during instructor training the other day. This issue appears twice in the episode. Since the purpose is to regenerate the file again maybe just a quick notation is needed and I propose the following.

In the referenced "Deleting Is Forever" section:

$nano draft.txt

Let’s again type in a few lines of text. Once we’re happy with our text, we can press Ctrl-O to write our data to disk. Once our file is saved, we can use Ctrl-X to quit the editor and return to the shell.

$ls

and then later in the "With Great Power Comes Great Responsibility" section:

$mkdir thesis
$nano thesis/draft.txt

Let’s again type in a few lines of text. Once we’re happy with our text, we can press Ctrl-O to write our data to disk. Once our file is saved, we can use Ctrl-X to quit the editor and return to the shell.

$ls thesis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment