From d90bfac1de4e4242ea6e4b8203afdbe998a101b1 Mon Sep 17 00:00:00 2001 From: local Date: Aug 30 2017 20:43:34 +0000 Subject: user story for cd --- diff --git a/en-US/sysadmin_user_stories/procedure-navigating_to_a_file_or_a_directory.adoc b/en-US/sysadmin_user_stories/procedure-navigating_to_a_file_or_a_directory.adoc index a94940f..4f10f79 100644 --- a/en-US/sysadmin_user_stories/procedure-navigating_to_a_file_or_a_directory.adoc +++ b/en-US/sysadmin_user_stories/procedure-navigating_to_a_file_or_a_directory.adoc @@ -1,48 +1,66 @@ // Include an 'ID' that corresponds to the title of the assembly // The ID will be used as an anchor for linking to the title // Do not change the ID to make sure existing links keep working -[#doing_one_task] -= Doing One Task +[#Navigating_to_a_File_or_Directory] += Navigating to a File or Directory -_Start the title with a verb form, such as Creating or Create._ +//_Start the title with a verb form, such as Creating or Create._ -_A task module is a procedure written with numbered steps -- what a customer needs to do to accomplish a goal successfully._ +//_A task module is a procedure written with numbered steps -- what a customer needs to do to accomplish a goal successfully._ // Ideally, base the name of the file on the title to avoid confusion // Use a consistent system for filenames and IDs, e.g.: // * Only substitute spaces with underscores // * Don't use any CAPS -This paragraph explains why the user performs the task, sets the context of the task, and may explain or list specical considerations specific to this task. Keep the information brief and focused on what is needed for this specific task. Suggested length is 1 to 3 sentences, can be longer if needed. +This procedure explains how to navigate to a file or directory using the command line. The cd command changes the current working directory assumed by subsequent commands. -.Prerequisites +The absolute path to a file or directory always starts with a "/" character to indicate the root of the Linux file system. Working down from the root, a path contains a list of directory names, separated by "/" characters at each nested directory level. The path to a directory contains only directory names. The path to a file contains zero or more directory names folowed by a single file name. Note that "/" and "\" are not interchangable in Linux pathnames. + +A relative path to a file or directory does not start with a "/". A relative path is evaluated relative to the current directory. -* Sentence or a bulleted list of pre-requisites that must be in place or done before the user starts this task. +.Prerequisites -* Delete section title and bullets if the task has no required pre-requisites. +* The user must have access to the Linux command line. On a system not running a graphical environment, commands can be entered directly at a text prompt. If a grahical environment is running, commands should be entered can be directly throgh a text prompt or through a graphical terminal such as GNOME Terminal. -* Text can be a link to a pre-requisite task that the user must do before starting this task. +.Procedure (navigate to directory using absolute path to directory) +. Enter the command "cd" followed by the absolute path to a directory (not a file). +. Enter the "pwd" command to print the current working directory -.Procedure + [local@mbpr ~]$ pwd + /home/local + [local@mbpr ~]$ cd /usr/local/bin + [local@mbpr bin]$ pwd + /usr/local/bin -_Put steps in a numbered list. The step sequence is important to a repeatable successful outcome._ +With an absolute path, it does not matter what the working directory was prior to the cd command. -. Start each step with an active verb, because each step corresponds to one user action. +.Procedure (navigate to directory using relative path to directory) -. Include one command or action per step. +. Enter the command "cd" followed by the path to a directory relative to the current directory. -. Format the step line as an unnumbered bullet if the procedure includes only 1 step (exception to numbering the steps). + [local@mbpr bin]$ cd /usr + [local@mbpr usr]$ pwd + /usr + [local@mbpr usr]$ cd local/bin + [local@mbpr bin]$ pwd + /usr/local/bin -. Include one command or action per step. +Any given directory can be reached through a single absolute paths, or a series of relative paths. -. Include one command or action per step. +.Procedure (navigate to directory using path with spaces or other special characters) +. Enter the command "cd" followed by the a path enclosed in single quotes + [local@mbpr ~]$ cd '/home/local/Name with spaces' -.Related Information +.Procedure (navigate to file path) -* Bulleted list of links to concepts, reference, or other tasks closely related to this task. +. Enter the command "cd" followed by the a path to the directory holding the file +. Enter the ls command to list files in this directory -* Include only the most relevant items as links, not every possible related item. -* Delete section title and bullets if no related information is needed. +//.Related Information +//* Bulleted list of links to concepts, reference, or other tasks closely related to this task. +//* Include only the most relevant items as links, not every possible related item. +//* Delete section title and bullets if no related information is needed.