[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
slackbook:shell [2012/09/12 19:51 (UTC)] – updated code block to syntax highlighting mfillpotslackbook:shell [2014/05/21 08:39 (UTC)] (current) – [File and Directory Creation and Deletion] man -> mkdir zithro
Line 15: Line 15:
 (short for **manual**) will bring up the included (short for **manual**) will bring up the included
 man-page for any application, system call, configuration file, or man-page for any application, system call, configuration file, or
-library you tell it too.  For example, man man+library you tell it too.  For example, **man man**
 will bring up the man-page for **//man//** itself. will bring up the man-page for **//man//** itself.
  
Line 124: Line 124:
  
  
-<code bash>+<code>
 darkstar:~$ cd / darkstar:~$ cd /
 darkstar:/$ls darkstar:/$ls
Line 145: Line 145:
  
  
-<code bash>+<code>
 darkstar:~$ pwd darkstar:~$ pwd
 /usr/local /usr/local
Line 161: Line 161:
  
  
-<code bash>+<code>
 darkstar:~/foo$ ls -l darkstar:~/foo$ ls -l
 -rw-r--r-- 1 alan users 0 2012-01-18 15:01 bar1 -rw-r--r-- 1 alan users 0 2012-01-18 15:01 bar1
Line 185: Line 185:
  
  
-<code bash>+<code>
 darkstar:~$ mkdir foo darkstar:~$ mkdir foo
 darkstar:~$ mkdir /slack/foo/bar/ darkstar:~$ mkdir /slack/foo/bar/
Line 196: Line 196:
 "/slack", then "/slack/foo", and finally "/slack/foo/bar" If you "/slack", then "/slack/foo", and finally "/slack/foo/bar" If you
 failed to use the //-p// argument, failed to use the //-p// argument,
-**//man//** would fail to create "/slack/foo/bar"+**//mkdir//** would fail to create "/slack/foo/bar"
 unless the first two already existed, as you saw in the example. unless the first two already existed, as you saw in the example.
  
Line 217: Line 217:
  
  
-<code bash>+<code>
 darkstar:~$ ls darkstar:~$ ls
 foo_1/ foo_2/ foo_1/ foo_2/
Line 252: Line 252:
  
  
-<code bash>+<code>
 darkstar:~$ zip -r /tmp/home.zip /home darkstar:~$ zip -r /tmp/home.zip /home
 darkstar:~$ zip /tmp/large_file.zip /tmp/large_file</code> darkstar:~$ zip /tmp/large_file.zip /tmp/large_file</code>
Line 267: Line 267:
  
  
-<code bash>+<code>
 darkstar:~$ unzip /tmp/home.zip darkstar:~$ unzip /tmp/home.zip
 </code> </code>
Line 286: Line 286:
  
  
-<code bash>+<code>
 darkstar:~$ gzip /tmp/large_file</code> darkstar:~$ gzip /tmp/large_file</code>
  
Line 295: Line 295:
  
  
-<code bash>+<code>
 darkstar:~$ gunzip /tmp/large_file.gz darkstar:~$ gunzip /tmp/large_file.gz
 darkstar:~$ ls /tmp/large_file* darkstar:~$ ls /tmp/large_file*
Line 308: Line 308:
  
  
-<code bash>+<code>
 darkstar:~$ zcat /tmp/large_file.gz darkstar:~$ zcat /tmp/large_file.gz
 Wed Aug 26 10:00:38 CDT 2009 Wed Aug 26 10:00:38 CDT 2009
Line 328: Line 328:
 strength. Unfortunately, achieving that greater compression is a slow strength. Unfortunately, achieving that greater compression is a slow
 and CPU-intensive process, so **//bzip2//**  and CPU-intensive process, so **//bzip2//** 
-typicall takes much longer to run than other alternatives.+typically takes much longer to run than other alternatives.
 ==== XZ / LZMA ==== ==== XZ / LZMA ====
  
  
 The latest compression utility added to Slackware is The latest compression utility added to Slackware is
-**//xz//**, which impliments the LZMA compression+**//xz//**, which implements the LZMA compression
 algorithm. This is faster than **//bzip2//** and algorithm. This is faster than **//bzip2//** and
 often compresses better as well. In fact, its blend of speed and often compresses better as well. In fact, its blend of speed and
 compression strength caused it to replace compression strength caused it to replace
 **//gzip//** as the compression scheme of choice for **//gzip//** as the compression scheme of choice for
-Slackware.  Unfortuantely, **//xz//** does not have+Slackware.  Unfortunately, **//xz//** does not have
 a man page at the time of this writing, so to view available options, a man page at the time of this writing, so to view available options,
 use the //--help// argument.  Compressing files is accomplished use the //--help// argument.  Compressing files is accomplished
Line 344: Line 344:
  
  
-<code bash>+<code>
 darkstar:~$ xz -z /tmp/large_file</code> darkstar:~$ xz -z /tmp/large_file</code>
 ==== tar ==== ==== tar ====
Line 383: Line 383:
  
  
-<code bash>+<code>
 darkstar:~$ tar -xvzf /tmp/tarball.tar.gz darkstar:~$ tar -xvzf /tmp/tarball.tar.gz
 darkstar:~$ tar -xvfz /tmp/tarball.tar.gz</code> darkstar:~$ tar -xvfz /tmp/tarball.tar.gz</code>
Line 407: Line 407:
  
  
-<code bash>+<code>
 darkstar:~$ tar -czf /tmp/tarball.tar.gz /tmp/tarball/</code> darkstar:~$ tar -czf /tmp/tarball.tar.gz /tmp/tarball/</code>
 ===== Reading Documents ===== ===== Reading Documents =====
Line 430: Line 430:
  
  
-<code bash>+<code>
 darkstar:~$ cat /etc/slackware-version darkstar:~$ cat /etc/slackware-version
 Slackware 14.0 Slackware 14.0
Line 446: Line 446:
 **//more//** will display the first few lines of a **//more//** will display the first few lines of a
 text file until your screen is full, then pause.  Once you've read text file until your screen is full, then pause.  Once you've read
-through that screen, you can proceed down one line by pressing ENTER,+through that screen, you can proceed down one line by pressing <key>'ENTER'</key>,
 or an entire screen by pressing <key>'SPACE'</key>, or by a or an entire screen by pressing <key>'SPACE'</key>, or by a
 specified number of lines by typing a number and then the specified number of lines by typing a number and then the
Line 475: Line 475:
  
 </note> </note>
- 
 ==== less ==== ==== less ====
  
Line 493: Line 492:
 Moreover, Slackware also includes a handy little pre-processor for Moreover, Slackware also includes a handy little pre-processor for
 **//less//** called **//less//** called
-''lesspipe.sh'' This allows a user to exectute+''lesspipe.sh'' This allows a user to execute
 **//less//** on a number of non-text files. **//less//** on a number of non-text files.
 ''lesspipe.sh'' will generate text output from ''lesspipe.sh'' will generate text output from
Line 515: Line 514:
 the / key and then your search string, but notice how the search the / key and then your search string, but notice how the search
 results are highlighted for you, and typing <key>'n'</key> will results are highlighted for you, and typing <key>'n'</key> will
-take you to the next occurence of the result while+take you to the next occurrence of the result while
 <key>'N'</key> takes you to the previous occurrence. <key>'N'</key> takes you to the previous occurrence.
  
  
-Also as with **//more//**, files maybe opened+Also as with **//more//**, files may be opened
 directly in **//less//** or piped to it: directly in **//less//** or piped to it:
  
  
-<code bash>+<code>
  
-darkstar:~$  <command>less +darkstar:~$  less 
-/usr/doc/less-&#42;/README</command> +/usr/doc/less:/README 
-darkstar:~$  <command>cat +darkstar:~$  cat 
-/usr/doc/less&#42;/README +/usr/doc/less:/README 
-/usr/doc/util-linux&#42;/README | less</command>+/usr/doc/util-linux:/README | less
 </code> </code>
  
Line 551: Line 550:
  
  
-<code bash>+<code>
 darkstar:~$ ln /etc/slackware-version foo darkstar:~$ ln /etc/slackware-version foo
 darkstar:~$ cat foo darkstar:~$ cat foo
Line 569: Line 568:
  
  
-<code bash>+<code>
 darkstar:~$ ln -s /etc/slackware-version foo darkstar:~$ ln -s /etc/slackware-version foo
 darkstar:~$ cat foo darkstar:~$ cat foo
Line 589: Line 588:
 ====== Sources ====== ====== Sources ======
 <!-- If you copy information from another source, then specify that source --> <!-- If you copy information from another source, then specify that source -->
- * Original source: [[http://www.slackbook.org/beta]] \\+  * Original source: [[http://www.slackbook.org/beta]] \\
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
- * Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson+  * Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson
 <!-- * Contrbutions by [[wiki:user:yyy | User Y]] --> <!-- * Contrbutions by [[wiki:user:yyy | User Y]] -->
  
 slackbook:shell ()