.


:




:

































 

 

 

 


tar zip




, :

# tar cvf backup.tar /etc

# gzip -9 backup.tar

backup.tar.gz. :

# gunzip backup.tar.gz

# tar xvf backup.tar

, , .

UNIX,

# tar cvf - /etc | gzip -9c > backup.tar.gz

tar-, /etc, ``-'', . gzip, backup.tar.gz. -c gzip , gzip , backup.tar.gz.

, , :#gunzip -cbackup.tar.gz | tarxvf

, gunzip backup.tar.gz . tar, ``-'', .

tar z, - , gzip. ,

# tarcvfzbackup.tar.gz /etc

# tarcvfbackup.tar /etc

# gzipbackup.tar

# tarxvfzbackup.tar.Z

# uncompress backup.tar.Z

# tar xvf backup.tar

:

1) Linux?

2) tar?

3) ?

4) gzip?

:

1. . . . 4- . 2015

2. . . Linux 4- - 2012

 

27. Linux. at. cron.

:

1. at

2. cron

3. anacron

Linux , - ( shell-) , , .

Linux- . at cron.

. at , - . - , cron crontab.

- , .

at

, , at (). at, . , /bin/sh.

at:

, 11 . at 23:00. - at >. , Enter. , , Ctrl+D. , , - .

POSIX.2. HH:MM ( HH - , MM - ). :

at 7 am 10202008 - 20- 2008 7

at 12:00 20.10.2008 - 20 2008 12

at 10 pmtoday - 10

at 3 amtomorrow - ( ) 3

, :

myjobs, , .

:

At 5 pm 10202008 - fmyjobs

, , atq, , :

, . atrm, . , atq.

at:

- m, , .

cron

cron - . , , cron. cron , . cron, crontab -, , /var/spool/cron/crontabs/. root.

/var/spool/cron/crontabs/ () . , test cron, - /var/spool/cron/crontabs/test. test .

, cron :

$ ps ax | grep [c]ron

cron . . cron - /etc/crontab. - 7 , , ..

/etc/crontab:

m h dom mon dow user command
17 * * * * root cd / &&run-parts--report/etc/cron.hourly

7- :

m - minute - - ; - (0-59)

h - hour - - ; (0-23) dom - day of month - - ; (1-31)

mon - month - - ; (1-12)

dow - day of week - - ; (0-7, 0 7 - , )

user - -

command - - , .

, , , . * - .

crontab - /etc/crond/, cron . , /etc/crontab. ( ).

crontab - , . crontab - crontab. crontab e, ( ) . , crontab - user, cron , /var/spool/cron/crontabs/ .

crontab - , /etc/cron.deny. , . . /etc/cron.allow.

/etc/crontab

SHELL=/bin/bash

PATH=/sbin:/bin:/usr/sbin:/usr/bin

MAILTO=root

HOME=/

# run-parts

01 * * * * root nice -n 19 run-parts --report /etc/cron.hourly 02

4 * * * root nice -n 19 run-parts --report /etc/cron.daily 22 4 *

* 0 root nice -n 19 run-parts --report /etc/cron.weekly 42 4 1 *

* root nice -n 19 run-parts --report /etc/cron.monthly

SHELL -, PATH , MAILTO , , HOME crond.

, , . /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly, /etc/cron.monthly.

anacron

anacron cron, . anacron , , cron, , . , 7 . cron , 7 . 6 , , , 7:20. 7:20 7:00, , cron , .

anacron , ( , ), . , .

anacron . , , /etc/anacrontab root. cron , , anacron , .

/etc/anacrontab :

ID

:

1 5 cron.daily run-parts /etc/cron.daily

7 10 cron.weekly run-parts /etc/cron.weekly

30 75 cron.monthly run-parts /etc/cron.monthly

 

:

  1. 10 6 * * * root myscript - myscript , 6 10
  2. 0 5 1 * * root myscript - myscript 5
  3. 30 23 * * 1-5 root myscript - myscript ( ) 23 30
  4. 0 23 1,3,7,15 1,7 * root myscript - myscript 1,3,7,15- , 23
  5. 30 0-23/3 * * * root myscript - . 0:30, 3:30 ..

:

1) Linux?

2) at cron?

3) ?

4) anacron cron?

:

1. . . . 4- . 2015

2. . . Linux 4- - 2012

28. TCP/IP Linux.

:

1. Linux

2. Linux

3. IP- Linux

4. ARP-

UNIX (socket). , . . , , , . . , , TCP (Transmission Control Protocol ). UDP (User Data Protocol ). IP (Internet Protocol). . , . . , 32- ( ) IPv4 128- IPv6.





:


: 2018-10-15; !; : 246 |


:

:

, .
==> ...

1357 - | 1256 -


© 2015-2024 lektsii.org - -

: 0.024 .