Difference between revisions of "Linux snippets"

From Tom's notes
Jump to navigation Jump to search
Line 1: Line 1:
 
[[Vserver]]
 
[[Vserver]]
 +
 +
=Startup scripts=
 +
[[Linux startup scripts]]
  
 
=Filesystem commands=
 
=Filesystem commands=

Revision as of 11:20, 13 April 2016

Vserver

Startup scripts

Linux startup scripts

Filesystem commands

Resize jfs filesystem

lvresize --size +5G /dev/vg0/lv0
mount -o remount,resize /dev/vg0/lv0

Resize ext filesystem

lvresize --size +5G /dev/vg0/lv0
resize2fs /dev/vg0/lv0

File manipulation

Rsync copy keeping all attributes

Using checksumming:

rsync -acPHAXSxvW --numeric-ids --delete --stats

Only comparing size and time:

rsync -aPHAXSxvW --numeric-ids --delete --stats