Linux crash: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 2: Zeile 2:
 
*[[nano]]
 
*[[nano]]
 
*[[vim]]
 
*[[vim]]
 +
=Directories=
 +
==Change Directory
 +
===same dir===
 +
*cd .
 +
===next higher dir===
 +
*cd ..
 +
===to home dir===
 +
*cd ~
 +
===to last dir===
 +
*cd -
 
=Filehandling=
 
=Filehandling=
 
==Copy==
 
==Copy==
Zeile 23: Zeile 33:
 
===hard===
 
===hard===
 
*ln dat1 dat2
 
*ln dat1 dat2
 +
 
=Userrights=
 
=Userrights=
 
==Change Mode==
 
==Change Mode==

Version vom 5. August 2019, 14:00 Uhr

Editors

Directories

==Change Directory

same dir

  • cd .

next higher dir

  • cd ..

to home dir

  • cd ~

to last dir

  • cd -

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