Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:handbook:commands [2010/07/08 15:14] – external edit 127.0.0.1 | en:handbook:commands [2016/10/01 05:30] (current) – Examples are more fit to illustrate renaming than copying of file contents. hgt | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| < | < | ||
| - | To list all the commands available on the system, you can simply press the Tab button on the left of the keyboard twice. For commands provided by the Busybox utility you can type | + | To list all the commands available on the system, you can simply press the Tab button on the left of the keyboard twice. For commands provided by the Busybox utility you can type: |
| - | < | + | |
| + | < | ||
| ===== List the files in a directory ===== | ===== List the files in a directory ===== | ||
| Line 57: | Line 58: | ||
| < | < | ||
| + | |||
| + | ===== Move (rename) files or directories ===== | ||
| + | |||
| + | When source and target file are in the same file system and the target file does not exist, the mv command simply renames the source file: | ||
| + | |||
| + | < | ||
| + | |||
| + | It can also rename directories (provided the new directory doesn' | ||
| + | |||
| + | < | ||
| + | |||
| + | Move files (and directories) to a new directory: | ||
| + | |||
| + | < | ||
| + | |||
| + | When renaming is not possible, the mv command takes the contents of a file and copies it to a new file, then deletes the original file. | ||
| + | |||
| + | ===== Create a new file ===== | ||
| + | |||
| + | The touch command can create a new empty file: | ||
| + | |||
| + | < | ||
| ===== Create a new directory ===== | ===== Create a new directory ===== | ||
| Line 81: | Line 104: | ||
| < | < | ||
| + | |||
| + | <note important> | ||
| Note you can also use the //-i// option to remove files or directories and their contents interactively: | Note you can also use the //-i// option to remove files or directories and their contents interactively: | ||
| Line 122: | Line 147: | ||
| To append to the following text file, put two greater than signs (>>) after cat, example: | To append to the following text file, put two greater than signs (>>) after cat, example: | ||
| - | < | + | < |
| $ cat >> packages.list << " | $ cat >> packages.list << " | ||
| The text... | The text... | ||
| Line 133: | Line 158: | ||
| Surf the web quickly and simply with the ' | Surf the web quickly and simply with the ' | ||
| - | < | + | < |
| $ retawq http:// | $ retawq http:// | ||
| or : | or : | ||
| Line 141: | Line 166: | ||
| ===== Talk on IRC ===== | ===== Talk on IRC ===== | ||
| - | To discuss and transfer files via the many IRC servers available, SliTaz provides | + | To discuss and transfer files via the many IRC servers available, SliTaz provides |
| - | + | ||
| - | < | + | |
| - | $ rhapsody | + | |
| - | / | + | |
| - | / | + | |
| - | </ | + | |
| ===== Download files ===== | ===== Download files ===== | ||
| Line 153: | Line 172: | ||
| To download various file formats on the internet, you have the //wget// command. To grab a simple html page, the contents of a folder or an entire website: | To download various file formats on the internet, you have the //wget// command. To grab a simple html page, the contents of a folder or an entire website: | ||
| - | < | + | < |
| ===== List the available partitions ===== | ===== List the available partitions ===== | ||
| Line 159: | Line 178: | ||
| To list the partitions on an internal or external hard drive, you can use cat to display the contents of /// | To list the partitions on an internal or external hard drive, you can use cat to display the contents of /// | ||
| - | < | + | < |
| $ cat / | $ cat / | ||
| or : | or : | ||
| Line 169: | Line 188: | ||
| To mount a local partition in the SliTaz filesystem, we recommend you use the ///mnt// directory. Example creating the necessary directory and mounting the hda6 partition of the first local hard drive on /// | To mount a local partition in the SliTaz filesystem, we recommend you use the ///mnt// directory. Example creating the necessary directory and mounting the hda6 partition of the first local hard drive on /// | ||
| - | < | + | < |
| # mkdir -p /mnt/hda6 | # mkdir -p /mnt/hda6 | ||
| # mount -t ext3 /dev/hda6 /mnt/hda6 | # mount -t ext3 /dev/hda6 /mnt/hda6 | ||
| Line 186: | Line 205: | ||
| To stop or restart SliTaz, you can use the halt or reboot commands or the < | To stop or restart SliTaz, you can use the halt or reboot commands or the < | ||
| - | < | + | < |
| # halt | # halt | ||
| To restart : | To restart : | ||