---
title: "Linux Basics - 2"
author: "willpower"
date: "2007-03-06T15:58:43Z"
tags: []
slug: "linux-basics-2"
draft: false
lastmod: "2007-03-06T15:58:43Z"
id: 57778
url: "https://willpower.iteye.com/blog/57778"
---

1&gt;man(help), passwd(change password), su - root(switch user), who(who is logged in), date(date and time), echo(disply message)

**echo $PATH**  
/usr/bin:/usr/local/bin  
**echo My name is $USER - Home directory=$HOME.**  
My name is hermie - Home directory=/home/hermie.

The **echo** command is very similar to the DOS command of the same name, except that the DOS **echo** command cannot display environment variables--it just displays a message.

**2&gt; Printing linux files**

**lpr paperless-office.txt**

The **lpr** command makes a copy of your file and stuffs it in the system's print queue (a process called *spooling*), so you can change or delete the original file without harming your printout.

The **lpr** command will accept two optional flags:

**-r** Delete the file after printing.

**-s** No spooling (don't make a temporary copy for printing).

The **-r** flag tells the system to delete the file after printing, and **-s** tells the system to print directly from the original file instead of spooling to the print queue. Of course, if you specify the **-s** flag, you can't modify or delete the original file while it's printing, but this option can save a bit of time (since no copy is made) when the original file is big.

3&gt; Joining files

**cat food**   Display the **food** file on the screen.

**cat scratch fever**   Join the files **scratch** and **fever** and then displayt he result on the screen.

**cat eats bird &gt; DetailsAt11**   Join the files **eats** and **bird** and save them in the file **DetailsAt11**.

4&gt; Searching for files: find

5&gt; Comparing files: diff

6&gt; Task scheduling: at