Error 

Tagged as ‘Sysadmin’

Linux File Permissions

Posted November 27, 2008 at 03:11am in Linux

When I first started out with Linux permissions were sorta hard to grasp, most likely because I never took the time to really sit down and understand them, but also because they are quite different than Windows permissions.

In Windows you can really put some detail in the ACLs, but with Linux you either need ACLs implemented or you need to understand how file permissions work. So first off, lets use the following example

# ls -l /
drwxr-xr-x  13 root root  4096 Apr 27  2007 usr
drwxr-xr-x  20 root root  4096 Oct  3 00:33 var

As you can see these are both owned by user root and group root and that the user has read, write, and execute permission permissions, while the group and others do not. So lets make a change to that to better explain permissions. So lets say we created /home/johndoe/usr and /home/johndoe/var.
Read the rest of this entry »

Double Bang

Posted November 16, 2008 at 10:11pm in Sysadmin

No I’m not excited about sudo, well I sorta am. I have run into situations where I typed a long command and forgot to type sudo. This is a huge problem when you can’t hit the home key and go to the start of the command, which happens in a lot of SSH tools.

The Fix!!!

sudo !!

Typing that will execute the last command, but it will execute it as if you had typed sudo at the beginning. This is a huge time saver.

Bang Asterisk

Posted November 16, 2008 at 10:11pm in Sysadmin

Similar to the double bang trick is bang+asterisk. This combinations takes just the parameters from the previous command.

[user@host ~]$ ls /home
user
[user@host ~]$ cd !*
cd /home
[user@host home]$ 

Enjoy!