Search This Blog

Blog Archive

Monday, March 24, 2008

linux commands



how many files are in that directory ?
use ls | (pipe) wc (wordcount)

disk usage
df -h

kill houdini but save a crash file:
find the process id number
ps -e |grep houdini

or for centOS
ps -ef |grep houdini

kill it and save a file
kill -SEGV (process id number)

file permissions:
from www.linuxforums.org/security/file_permissions.html

r readable
w writable
x executable

u user
g group - ie Administrators
0 others - not a member of a group or the owner of the file
a all
- no permission

use ls -l to see file permissions

eg

ls -l myfile
-rwxr-x--- 1 george administrators 10 2006-03-09 21:31 myfile

so for george - the owner - the file is readable , writable and executable.
for other administrators - the file is only readable - not writable but still executable
other users cannot read, write or run this file.

changing permissions : chmodif george wanted to give write permission to the other administrators
he would type

chmod g+w (myfile)
To check your Ubuntu version using the command line:
  1. Open a Terminal (Applications -> Accessories -> Terminal).
  2. Type lsb_release -a and press Enter.
  3. The Ubuntu version will be displayed on the screen.

No comments: