Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

>Redirects the output of a command to a file, overwriting the file if it exists
>>Redirects the output of a command to a file, appending to the file if it exists
<Redirects input from a file to a command
<<Redirects a string into the standard input of a command

Wild cardsWildcards

A number of characters are interpreted by shell before any other action takes place. These characters are known as wildcard characters. Usually these characters are used in place of filenames or directory names.

...


Here are some examples for the usage of wild cardswildcards:

  • cat c* : displays any file whose name begins with c including the file c, if it exists.
  • ls *.c : lists all files that have a .c extension.
  • cp ../rmt? .  : copies every file in the parent directory that is four characters long and begins with rmt to the working directory. (The names will remain the same.)
  • ls rmt[34567] : lists every file that begins with rmt and has a 3, 4, 5, 6, or 7 at the end.
  • ls rmt[3-7] : does exactly the same thing as the previous example.
  • ls ~ : lists your home directory.
  • ls ~username : lists the home directory of the guy with the user name username.

...