Navigating paths Commands

Navigating paths Commands

pwd

This command displays the full path name of the current location, which helps determine appropriate syntax for reaching files using relative path names.
pwd command

ls

This command lists directory contents for the specified directory or, if no directory is given, for the current directory.

ls has multiple options for displaying attributes on files. The most common and useful are -l(long listing format), -a (all files, includes hidden files), and -R (recursive, to include the contents of all subdirectories).
ls command

cd

Use the cd command to change directories.

At any time, we can return to the user’s home directory by using cd without specifying a destination. The prompt displays the tilde (-) character when the user’s current directory is their home directory.

The cd command has many options. A few are so useful as to be worth practicing early and using often. The cd – changes directory to the directory where the user was previous to the current directory. Watch as this user takes advantage of this behavior to alternate between two directories, useful when processing a series of similar tasks.

touch

The touch command normally updates a file’s timestamp to the current date and time without otherwise modifying it. This is useful for creating empty files, which can be used for practice,since “touching” a file name that does not exist causes the file to be created.

Add Comment