Whenever you want to take the output of a command and save it, you can. This is a functionality built into bash. All commands have two outputs: STDOUT and STDERR. You can redirect these both individually. To redirect STDERR by redirection, use 2>. If you only want to redirect the stdout, you could without touching the STDERR.
- [Instructor] Every command has one input…standard in and two outputs…standard out and standard error.…A pipe sends standard out from one command…to the standard in of another.…A redirect works in a similar manner,…but the source or destination is the file system.…By default the output of a command goes to the screen.…This includes standard out and standard error.…Standard out is the successful output from a command.…Standard error is used for error messages.…Redirection allows us to split…these two outputs individually.…
We can redirect either output or both to a disk.…Commands also have a standard in.…If you wanted to redirect a file to a command…we can with the redirect toward the command.…Once the command has processed the output…we could then redirect that output back to the disk.…Let's see what this looks like using commands.…To redirect standard out from a command to a file…use a greater than symbol.…One greater than symbol overwrites a file…or creates it if it doesn't exist.…To append to a file…supply two greater than symbols.…
- Write the command that will take you to the most recent directory.
- Write the command that brings back the arguments and options from the previous line.
- Explain what extended globs can do.
- Identify the access.conf line that will restrict all users from using the cron service except for the user named bob.
- List the line that will get a list of only running services.
- Identify what typing ‘systemctl enable crond’ will do.
Skill Level Intermediate
Linux: User and Group Managementwith Grant McWilliams1h 8m Intermediate
1. Linux Shells Overview
2. Using the Bash Shell
3. Linux Processes
4. Job Scheduling
5. System Services
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.