Linux crash

Aus xinux.net
Zur Navigation springen Zur Suche springen

Editors

Directories

Change Directory

same dir

  • cd .

next higher dir

  • cd ..

to home dir

  • cd ~

to last dir

  • cd -

Listing

  • ls
  • ls -a
  • ls -l
  • ls -t
  • ls -r
  • ls -h
  • ls -Q
  • ls -S

Filehandling

Copy

regular

  • cp dat1.txt dat2.txt

with subdirs

  • cp -r dir1 dir2

Move

regular

  • mv dat1.txt dat2.txt

with subdirs

  • mv dir1 dir2

Delete

regular

  • rm dat1

dirs

  • rm -r dir1

Link

soft

  • ln -s dat1 dat2

hard

  • ln dat1 dat2

Userrights

Change Mode

oktal

  • chmod 755 dat1

symbolik

  • chmod u=rwx,g=rx,o=rx dat1

oktal recursiv

  • chmod -R 755 dir1

symbolik recursiv

  • chmod -R u=rwx,g=rx,o=rx dir1

Change User and/or Group

to User xinux

  • chown xinux dat1

to User xinux and Group admins

  • chown xinux:admins dat1

to Group admins

  • chown :admins dat1

to Group admins

  • chgrp admins dat1

Dir to User xinux

  • chown -R xinux dir1