HappyMac
UNIX Befehle
Wed, Jan 28, 2004; by d.Dir.
Navigation:
-
ls
lists
current directory contents
-
cd
[dir] changes to directory [dir] (replace dir with the directory you want)
You can also use these instead of [dir]:
- '
/
' goto
the top of the directory structure (root directory)
- '
..
'
goto the folder one level up
- '
.
' goto
the current folder
- '
~
' goto
your user home folder
File manipulation:
-
mv
[file]
moves a file (replace file with the desired filename)
-
rm
[file]
removes it
-
cp
[original
file] [place to copy it to] copies a file
-
rm -r
[folder]
removes that folder
-
chown
[file]
[UID] changes the owner of a file or folder
-
chgrp
[file]
[group ID] changes the group of a file or folder
-
chmod
[mode]
[file] sets the execution(1), read(4), and write(2) permissions of a file
or folderUseful programs:
-
man
[command]
gives you a manual on the command. Always do this before running a command
for the first time!
-
gnutar -xf
[file]
expands a .tar file
-
gnutar -xzf
[file]
expands a .tgz file
-
grep
[pattern]
[file] searches for a pattern in a file
-
ftp
[host
name] command line ftp client
-
ssh
[host
name] command line ssh client
-
ps -u
[username]
lists all processes that user has running,
-
ps -aux
lists all processes on the computer
-
top
lists
all processes being run, and some other useful info
commands:
-s5 20 = 20
top processes every 5 secs;
-d
= live
-
kill
[pid]
kills the process with the given pid (use top to find out the pid)
-
df -k
- shows infromation about filesystem space usage
-
uname -a
- your system information
-
uptime
- how long your computer has been on
-
netstat
network statistics
commands
-a
= whats
connected;
-r
state of all processes;
'Access Denied' Problem:
Erste Hilfe:
-
fsck -y
- oder bei Panther mit journaling:
fsck
-f
Wartungsarbeiten:
-
sudo sh/etc/daily
-
sudo sh/etc/weekly
-
sudo sh/etc/weekly
|