mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
69 lines
5.3 KiB
Markdown
69 lines
5.3 KiB
Markdown
|
[#]: collector: (lujun9972)
|
||
|
[#]: translator: ( )
|
||
|
[#]: reviewer: ( )
|
||
|
[#]: publisher: ( )
|
||
|
[#]: url: ( )
|
||
|
[#]: subject: (7 Bash tutorials to enhance your command line skills in 2021)
|
||
|
[#]: via: (https://opensource.com/article/21/1/bash)
|
||
|
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
|
||
|
|
||
|
7 Bash tutorials to enhance your command line skills in 2021
|
||
|
======
|
||
|
Bash is the default command line shell on most Linux systems. So why not
|
||
|
learn how to get the most out of it?
|
||
|
![Terminal command prompt on orange background][1]
|
||
|
|
||
|
Bash is the default command line shell on most Linux systems. So why not learn how to get the most out of it? This year, Opensource.com featured many great articles to help you leverage the power of the Bash shell. These are some of the most-read articles about Bash:
|
||
|
|
||
|
## [Read and write data from anywhere with redirection in the Linux terminal][2]
|
||
|
|
||
|
Redirection of input and output is a natural function of any programming or scripting language. Technically, it happens inherently whenever you interact with a computer. Input gets read from stdin (standard input, usually your keyboard or mouse), output goes to stdout (standard output, a text or data stream), and errors get sent to stderr. Understanding that these data streams exist enables you to control where information goes when you're using a shell such as Bash. Seth Kenlon shared these great tips to get data from one place to another without a lot of mouse moving and key pressing. You may not use redirection often, but learning to use it can save you a lot of time needlessly opening files and copying and pasting data.
|
||
|
|
||
|
## [Get started with Bash scripting for sysadmins][3]
|
||
|
|
||
|
Bash is free and open source software, so anyone can install it, whether they run Linux, BSD, OpenIndiana, Windows, or macOS. Seth Kenlon helps you learn the commands and features that make Bash one of the most powerful shells available.
|
||
|
|
||
|
## [Try this Bash script for large filesystems][4]
|
||
|
|
||
|
Have you ever wanted to list all the files in a directory, but just the files, nothing else? How about only the directories? If you have, then Nick Clifton's article might be just what you're looking for. Nick shares a nifty Bash script that can list directories, files, links, or executables. The script works by using the **find** command to do the searching, and then it runs **ls** to show details. It's a clever solution for anyone managing a large Linux system.
|
||
|
|
||
|
## [Screenshot your Linux system configuration with Bash tools][5]
|
||
|
|
||
|
There are many reasons you might want to share your Linux configuration with other people. You might be looking for help troubleshooting a problem on your system, or maybe you're so proud of the environment you've created that you want to showcase it to fellow open source enthusiasts. Don Watkins shows us screenFetch and Neofetch to capture and share your system configuration.
|
||
|
|
||
|
## [6 Handy Bash scripts for Git][6]
|
||
|
|
||
|
Git has become a ubiquitous code management system. Knowing how to manage a Git repository can streamline your development experience. Bob Peterson shares six Bash scripts that will make your life easier when you're working with Git repositories. **gitlog** prints an abbreviated list of current patches against the master version. Variations of the script can show the patch SHA1 IDs or search for a string within a collection of patches.
|
||
|
|
||
|
## [5 ways to improve your Bash scripts][7]
|
||
|
|
||
|
A system admin often writes Bash scripts, some short and some quite lengthy, to accomplish various tasks. Alan Formy-Duval explains how you can make your Bash scripts simpler, more robust, and easier to read and debug. We might assume that we need to employ languages, such as Python, C, or Java, for higher functionality, but that's not necessarily true. The Bash scripting language is very powerful. There is a lot to learn to maximize its usefulness.
|
||
|
|
||
|
## [My favorite Bash hacks][8]
|
||
|
|
||
|
Katie McLaughlin helps you improve your productivity with aliases and other shortcuts for the things you forget too often. When you work with computers all day, it's fantastic to find repeatable commands and tag them for easy use later on. Katie's summary of useful Bash features and helper commands to save you time.
|
||
|
|
||
|
These Bash tips take an already powerful shell to a whole new level of usefulness. Feel free to share your own tips, too.
|
||
|
|
||
|
--------------------------------------------------------------------------------
|
||
|
|
||
|
via: https://opensource.com/article/21/1/bash
|
||
|
|
||
|
作者:[Jim Hall][a]
|
||
|
选题:[lujun9972][b]
|
||
|
译者:[译者ID](https://github.com/译者ID)
|
||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||
|
|
||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||
|
|
||
|
[a]: https://opensource.com/users/jim-hall
|
||
|
[b]: https://github.com/lujun9972
|
||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
|
||
|
[2]: https://opensource.com/article/20/6/redirection-bash
|
||
|
[3]: https://opensource.com/article/20/4/bash-sysadmins-ebook
|
||
|
[4]: https://opensource.com/article/20/2/script-large-files
|
||
|
[5]: https://opensource.com/article/20/1/screenfetch-neofetch
|
||
|
[6]: https://opensource.com/article/20/1/bash-scripts-git
|
||
|
[7]: https://opensource.com/article/20/1/improve-bash-scripts
|
||
|
[8]: https://opensource.com/article/20/1/bash-scripts-aliases
|