Match the commands ls, cd, pwd
to their descriptions
ls
: lists all files and subdirectories in the current directory.cd [path]
: changes the current directory to the directory specified by the path argument.pwd
: The present working directory command lists the path from your current location starting from root.Given a folder structure diagram, a list of ‘cd (path)’ commands and target files, match the paths to the target files.
Referencing the above file structure - if you are currently in the Notes directory what would running the command pwd return?
/Desktop/Homework/Notes
Use VSCode to create a folder. Within the folder create a .js file containing console.log(‘hello new world’); and save it.
Manually
:To create a file within that folder, click on the folder to enter it, and then selected ‘new file’ to create a file (you can change the type of file it is by appending the correct ext. type)
Via Terminal
use code . command to open VSCode with your pwd.
node <fileName.js>
into your terminal to execute.