Special Characters and Command Line Editing in Linux?

This article will let you walk through the commands to navigate through files and directories in the Linux operating system. You can manipulate directories and files. Some of the tasks are easy to do.

When you are using commands for navigation, you have more power and flexibility as compared to using a graphical user interface. While the latter option is easy to perform and is suitable to execute simple tasks, you need the command line for pulling off complicated tasks. Copying HTML files from one directory to another is hard in a graphical user interface; however, it is easier to do in a command-line system.

Before I move on to exploring the commands that you can use to manipulate files and directories, I will explain some special characters that you can use in Linux.

Special Characters

When you are discussing Linux with others, you may hear about some special characters that Linux users encounter during operations. Each special character has a job to do, knowing which will make things easier for you.

  • * is technically called asterisk or star. It is used for a regular expression and as a glob character.
  • ‘ is technically called tick or single quote. It is used for literal strings.
  • Special character (.) is technically called dot and is used to denote the current directory you are working in or the hostname or file delimiter.
  • $ is technically called the dollar sign. It is used for denotation of a variable or for representing the end of the line.
  • \ is technically called backslash. It is used for macros and literals.
  • / is technically called forward slash. It is used as a search command or a directory delimiter.
  • ! is technically called bang. It is used for command history and negation.
  • | is technically called a pipe. It is used for command pipes.
  • _ is technically an underscore or under. It is used for the cheap subtitle for some particular space.
  • ‘ is technically called backtick or backquote. It is used for the substitution of command.
  • ” is technically called double quote. It is used for semi-literal strings.
  • {} is technically called braces or curly brackets. It is used for ranges or statement blocks.
  • ^ is technically called caret. It is used to denote the start of line and negation.
  • [] is technically squares or brackets. It is used for ranges.
  • ~ is technically called squiggle or tilde. It is used as a directory shortcut and negation.
  • # is technically called the pound, hash, or sharp. It is used for preprocessor, comments, and substitutions.

Command-Line Editing

As you move around and explore the Linux shell, you will find out that you have the freedom to move in the shell through arrow keys. This comes as a standard on most Linux operating systems. It is a good idea to know about the standard keystrokes on Linux operating systems.

  • CTRL-B is used to move the cursor on the screen to the left side.
  • CTRL-F is used to move the cursor on the screen to the right side.
  • CTRL-E is used to move the cursor on the screen to the end of a line.
  • CTRL-A is used to move the cursor on the screen to the start of a line.
  • CTRL-P is used to view any previous commands on the screen. It is used to move the cursor upside.
  • CTRL-N is used to move the cursor to the downside, and it is also used to view the next command.
  • CTRL-K is used to erase everything from the cursor to the end of a line.
  • CTRL-W is used to erase the preceding word from the cursor on the screen.
  • CTRL-U is used to erase everything from the cursor to the start of a line.
  • CTRL-Y is used to paste the erased text that you have already cut off on the screen by the command CTRL-U. It is similar to copy and paste in word processors.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.