How many commands can be kept in memory for your current shell session echo

How many commands can be kept in memory for your

This preview shows page 122 - 126 out of 302 pages.

5. How many commands can be kept in memory for your current shell session ?echo $HISTSIZE6. Where are these commands stored when exiting the shell ?echo $HISTFILE7. How many commands can be written to the history filewhen exiting your current shellsession ?echo $HISTFILESIZE8. Make sure your current bash shell remembers the next 5000 commands you type.HISTSIZE=50009. Open more than one console (press Ctrl-shift-t in gnome-terminal) with the same useraccount. When is command history written to the history file ?when you type exit
Background image
113Chapter 15. file globbingThe shell is also responsible for file globbing(or dynamic filename generation). This chapterwill explain file globbing.
Background image
file globbing11415.1. * asteriskThe asterisk *is interpreted by the shell as a sign to generate filenames, matching the asteriskto any combination of characters (even none). When no path is given, the shell will usefilenames in the current directory. See the man page of glob(7)for more information. (Thisis part of LPI topic 1.103.3.)[[email protected] gen]$ lsfile1 file2 file3 File4 File55 FileA fileab Fileab FileAB fileabc[[email protected] gen]$ ls File*File4 File55 FileA Fileab FileAB[[email protected] gen]$ ls file*file1 file2 file3 fileab fileabc[[email protected] gen]$ ls *ile55File55[[email protected] gen]$ ls F*ile55File55[[email protected] gen]$ ls F*55File55[[email protected] gen]$15.2. ? question markSimilar to the asterisk, the question mark ?is interpreted by the shell as a sign to generatefilenames, matching the question mark with exactly one character.[[email protected] gen]$ lsfile1 file2 file3 File4 File55 FileA fileab Fileab FileAB fileabc[[email protected] gen]$ ls File?File4 FileA[[email protected] gen]$ ls Fil?4File4[[email protected] gen]$ ls Fil??File4 FileA[[email protected] gen]$ ls File??File55 Fileab FileAB[[email protected] gen]$
Background image
file globbing11515.3. [] square bracketsThe square bracket [is interpreted by the shell as a sign to generate filenames, matchingany of the characters between [and the first subsequent ]. The order in this list between thebrackets is not important. Each pair of brackets is replaced by exactly one character.[[email protected] gen]$ ls file1 file2 file3 File4 File55 FileA fileab Fileab FileAB fileabc[[email protected] gen]$ ls File[5A]FileA[[email protected] gen]$ ls File[A5]FileA[[email protected] gen]$ ls File[A5][5b]File55[[email protected] gen]$ ls File[a5][5b]File55 Fileab[[email protected] gen]$ ls File[a5][5b][abcdefghijklm]ls: File[a5][5b][abcdefghijklm]: No such file or directory[[email protected] gen]$ ls file[a5][5b][abcdefghijklm]fileabc[[email protected] gen]$You can also exclude characters from a list between square brackets with the exclamationmark !. And you are allowed to make combinations of these wild cards.[[email protected] gen]$ ls file1 file2 file3 File4 File55 FileA fileab Fileab FileAB fileabc[[email protected] gen]$ ls file[a5][!Z]fileab[[email protected] gen]$ ls file[!5]*file1 file2 file3 fileab fileabc[[email protected] gen]$ ls file[!5]?
Background image
Image of page 126

You've reached the end of your free preview.

Want to read all 302 pages?

  • Fall '16
  • ibrahim
  • ........., Debian, Linux kernel, Linux distribution

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture