issue72:certifie_linux
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| issue72:certifie_linux [2013/05/08 14:18] – créée andre_domenech | issue72:certifie_linux [2013/09/09 09:10] (Version actuelle) – [1] auntiee | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | Call me pernickety, but when I use ls, I prefer my files listed vertically not horizontally. Most of the time anyway. ls -1 lists vertically, one file or folder per line. (I’m salivating as I write.); but I don’t want to write ls -1 each time. So what can I do? Use the alias function. It's very simple, and also on the LPIC 1 Exam 101 syllabus.* alias forms new commands or modifies existing commands, the latter relevant here. But first: which aliases (aliai?) already exist? | + | ===== 1 ===== |
| + | **Call me pernickety, but when I use ls, I prefer my files listed vertically not horizontally. Most of the time anyway. ls -1 lists vertically, one file or folder per line. (I’m salivating as I write.); but I don’t want to write ls -1 each time. So what can I do? Use the alias function. It's very simple, and also on the LPIC 1 Exam 101 syllabus.* alias forms new commands or modifies existing commands, the latter relevant here. But first: which aliases (aliai?) already exist?** | ||
| rpwitt@rpwitt-laptop: | rpwitt@rpwitt-laptop: | ||
| Ligne 8: | Ligne 9: | ||
| alias ls='ls --color=auto' | alias ls='ls --color=auto' | ||
| - | In my case (Ubuntu 12.04 LTS), ls comes preset with the alias 'ls --color=auto', | + | Dites de moi que je suis tatillonne, mais lorsque j' |
| + | |||
| + | rpwitt@rpwitt-laptop: | ||
| + | ... | ||
| + | alias l='ls -CF' | ||
| + | alias la='ls -A' | ||
| + | alias ll='ls -alF' | ||
| + | alias ls='ls --color=auto' | ||
| + | ===== 2 ===== | ||
| + | **In my case (Ubuntu 12.04 LTS), ls comes preset with the alias 'ls --color=auto', | ||
| To have one file or folder per line yet keep the colour coding: | To have one file or folder per line yet keep the colour coding: | ||
| - | (N.B. Although not always necessary, it’s good practice to set your alias commands inside apostrophes) | + | (N.B. Although not always necessary, it’s good practice to set your alias commands inside apostrophes)** |
| alias ls='ls -1 --color=auto' | alias ls='ls -1 --color=auto' | ||
| - | Execute the command. | + | **Execute the command.** |
| rpwitt@rpwitt-laptop: | rpwitt@rpwitt-laptop: | ||
| Ligne 28: | Ligne 38: | ||
| shell_scripting.pdf | shell_scripting.pdf | ||
| - | And there she blows. | + | Dans mon cas (Ubuntu 12.04 LTS), ls est prédéfini avec l' |
| + | |||
| + | Pour avoir un fichier ou un dossier par ligne tout en gardant le code couleur : | ||
| + | |||
| + | (NB : Bien que pas toujours nécessaire, | ||
| + | |||
| + | alias ls='ls -1 --color=auto' | ||
| + | |||
| + | Exécuter la commande : | ||
| + | |||
| + | rpwitt@rpwitt-laptop: | ||
| + | c_programming.pdf | ||
| + | lfs.pdf | ||
| + | LinuxAdm.pdf | ||
| + | linux_nutshell.pdf | ||
| + | lpic.pdf | ||
| + | nand2tetris | ||
| + | prog_interface.pdf | ||
| + | shell_scripting.pdf | ||
| + | |||
| + | ===== 3 ===== | ||
| + | |||
| + | **And there she blows. | ||
| But wait! It's not enough. I want to have my nand2tetris folder (very cool little learning project) at the top of that list. In fact, I always want my folders listed first. A quick consultation under ls --help informs me that ls --group-directories-first will get the job done. I can have all I would have hoped (and still do ever hope) for. If only I wouldn’t have to type that pesky addendum to each ls command: --group-directories-first. | But wait! It's not enough. I want to have my nand2tetris folder (very cool little learning project) at the top of that list. In fact, I always want my folders listed first. A quick consultation under ls --help informs me that ls --group-directories-first will get the job done. I can have all I would have hoped (and still do ever hope) for. If only I wouldn’t have to type that pesky addendum to each ls command: --group-directories-first. | ||
| - | alias saves the day again. | + | alias saves the day again.** |
| + | |||
| + | Et ça y est, c'est fait. | ||
| + | |||
| + | Mais attendez ! Ce n'est pas assez. Je veux avoir mon dossier nand2tetris (petit projet d' | ||
| + | alias est à nouveau venu à la rescousse. | ||
| alias ls='ls -1 --color=auto --group-directories-first' | alias ls='ls -1 --color=auto --group-directories-first' | ||
| Ligne 41: | Ligne 78: | ||
| ... | ... | ||
| - | It's a beautiful sight. | + | ===== 4 ===== |
| + | |||
| + | **It's a beautiful sight. | ||
| + | |||
| + | |||
| + | *The alias command is a part of LPIC learning statement 1.105.1, Customize and use the shell environment. (weight: 4)** | ||
| + | C'est très beau. | ||
| - | *The alias command is a part of LPIC learning statement | + | * La commande |
issue72/certifie_linux.1368015482.txt.gz · Dernière modification : 2013/05/08 14:18 de andre_domenech
