Difference between revisions of "Linux"

From Joseph Luis Wiki
Jump to: navigation, search
m (Administration)
m (Commands)
Line 18: Line 18:
  
 
=Commands=
 
=Commands=
 +
===Archiving & Compression===
 +
*zip/unzip
 +
 +
 +
*tar
 +
Extract excluding a folder
 +
 +
<pre>
 +
tar -exclude <folder to skip> -xzf file.tar.gz
 +
</pre>

Revision as of 08:54, 6 May 2013

Back to the TOC

Administration

How to set up a Linux email .forward file correctly

(by Eddie)

1. Create a file called “.forward” in your home directory. If your username is “billg”, the file should (likely) be created at “/home/billg/.forward”. Stick the email address you’d like to forward emails to in that file. You can accomplish this quickly from the command line using the command “echo ‘billg@microsoft.com’ > /home/billg/.forward”

2. After you’ve done this, make sure you set the file so that it’s not world-writeable! (This is the step I overlooked). “chmod 644 /home/billg/.forward”

That’s it – your email should be forwarded correctly.

The reason it doesn’t work when the permissions aren’t set correctly is a security thing – just imagine the risks if anyone was able to write to your .forward file. As a precaution, the system will ignore the .forward file if it is world writeable.

Note by Colin: Not only does the file have to have restricted permissions, but the directory containing the file has to have restricted permissions. Sendmail’s log was very helpful in figuring that out.

Commands

Archiving & Compression

  • zip/unzip


  • tar

Extract excluding a folder

tar -exclude <folder to skip> -xzf file.tar.gz