SliTaz GNU/Linux official and community documentation wiki.
.png

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:handbook:commands [2010/07/08 17:14]
127.0.0.1 external edit
en:handbook:commands [2016/10/01 07:30] (current)
hgt Examples are more fit to illustrate renaming than copying of file contents.
Line 11: Line 11:
 <​code>​ $ cp --help </​code>​ <​code>​ $ cp --help </​code>​
  
-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
-<​code>​ busybox --help</​code>​+ 
 +<​code> ​busybox --help </​code>​
  
 ===== List the files in a directory ===== ===== List the files in a directory =====
Line 57: Line 58:
  
 <​code>​ $ cp -a Templates /​home/​hacker </​code>​ <​code>​ $ cp -a Templates /​home/​hacker </​code>​
 +
 +===== 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: 
 + 
 +<​code>​ $ mv file1 file2 </​code>​
 +
 +It can also rename directories (provided the new directory doesn'​t exist): ​
 +
 +<​code>​ $ mv ~/Documents ~/Docs </​code>​
 +
 +Move files (and directories) to a new directory:
 +
 +<​code>​ $ mv file1 file2 dir1 dir2 ~/Documents </​code>​
 +
 +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: 
 +
 +<​code>​ $ touch newfile </​code>​
  
 ===== Create a new directory ===== ===== Create a new directory =====
Line 81: Line 104:
  
 <​code>​ $ rm -rf /​home/​hacker/​Templates </​code>​ <​code>​ $ rm -rf /​home/​hacker/​Templates </​code>​
 +
 +<note important>​Be careful when using this option. It will delete everything without asking!</​note>​
  
 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:
  
-<​code> ​+<​code>​
  $ cat >> packages.list << "​EOF"​  $ cat >> packages.list << "​EOF"​
  The text...  The text...
Line 133: Line 158:
 Surf the web quickly and simply with the '​retawq'​ text-mode web browser. Note that you can also use the local browser. You can then navigate easily with the arrows on your keyboard - links are colored blue and can be followed by pressing <​ENTER>:​ Surf the web quickly and simply with the '​retawq'​ text-mode web browser. Note that you can also use the local browser. You can then navigate easily with the arrows on your keyboard - links are colored blue and can be followed by pressing <​ENTER>:​
  
-<​code> ​+<​code>​
  $ retawq http://​www.slitaz.org/​en  $ retawq http://​www.slitaz.org/​en
  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 ​Rhapsody. The IRC client is simple, fast and lightweight,​ providing a pleasant, easy to handle ​ncurses ​configuration menu. To start the application from a terminal connecting to server (//​irc.toile-libre.org//​) and joining //#slitaz//: +To discuss and transfer files via the many IRC servers available, SliTaz provides ​LostIRC. The IRC client is simple, fast and lightweight,​ providing a pleasant, easy to handle ​GTK configuration menu. One of the main IRC channels for slitaz ​is irc.freenode.net#​slitaz
- +
-<​code>​  +
- $ rhapsody +
- /​connect ​irc.freenode.net +
- /​join ​#slitaz +
-</​code> ​+
  
 ===== 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:
  
-<​code> ​ $ wget http://​www.slitaz.org/​en/​doc/handbook/ </​code> ​+<​code> ​ $ wget http://​www.slitaz.org/​en/​doc/​ </​code> ​
  
 ===== 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 ///​proc/​partitions//​ or use the //fdisk// utility with the -l option meaning list. You can then mount the individual partition(s) that you want to use: To list the partitions on an internal or external hard drive, you can use cat to display the contents of ///​proc/​partitions//​ or use the //fdisk// utility with the -l option meaning list. You can then mount the individual partition(s) that you want to use:
  
-<​code> ​+<​code>​
  $ cat /​proc/​partitions  $ cat /​proc/​partitions
  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 ///​mnt/​hda6//:​ 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 ///​mnt/​hda6//:​
  
-<​code> ​+<​code>​
  # 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 <​Ctrl+Alt+Delete>​ key combination which enables a system reboot. In case of any problems you can use the -f option signifing forced: To stop or restart SliTaz, you can use the halt or reboot commands or the <​Ctrl+Alt+Delete>​ key combination which enables a system reboot. In case of any problems you can use the -f option signifing forced:
  
-<​code> ​+<​code>​
  # halt  # halt
  To restart :  To restart :
 
en/handbook/commands.1278602063.txt.gz · Last modified: 2010/07/18 17:46 (external edit)