| /l3/users/29-07-2013/NT-Ladm/debian2.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 |
|
|
#crontab -u user -e
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
*/1 * * * * rm -rf ~/*.mp3
[ Записано 23 строки ]
crontab: installing new crontab
|
|
#crontab -u user -l
# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system ... # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command */1 * * * * rm -rf ~/*.mp3 |
|
#crontab -l
no crontab for root |
|
#crontab -e
:q# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system # daemon's notion of time and timezones. # # Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # Сохранить измененный буфер (Ответ "Нет" УНИЧТОЖИТ ВСЕ ИЗМЕНЕНИЯ) ? No modification made |
|
#export EDITOR=vim
|
|
#crontab -e
15 # 16 # For example, you can run a backup of all your user accounts 17 # at 5 a.m every week with: 18 # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ 19 # 20 # For more information see the manual pages of crontab(5) and cron(8) 21 # 22 # m h dom mon dow command ~ 22,1 Весь 23 E37: Изменения не сохранены (добавьте !, чтобы обойти проверку) No modification made |
|
#ls /var/spool/
anacron/ cron/ exim4/ mail/ squid3/ |
|
#ls /var/spool/cron/
atjobs/ atspool/ crontabs/ |
|
#ls /var/spool/cron/crontabs/
user |
|
#crontab -l
no crontab for root |
|
#ls /etc/cron*
/etc/crontab /etc/cron.d: anacron /etc/cron.daily: 0anacron aptitude dpkg locate man-db passwd apt bsdmainutils exim4-base logrotate mlocate standard /etc/cron.hourly: /etc/cron.monthly: 0anacron /etc/cron.weekly: 0anacron man-db |
|
#ls -d /etc/cron*
/etc/cron.d /etc/cron.hourly /etc/crontab /etc/cron.daily /etc/cron.monthly /etc/cron.weekly |
|
#ls -d /etc/cron.allow
ls: невозможно получить доступ к /etc/cron.allow: Нет такого файла или каталога |
|
# 2
1 # /etc/anacrontab: configuration file for anacron
2
3 # See anacron(8) and anacrontab(5) for details.
4
5 SHELL=/bin/sh
6 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
ly
7
12
8 # These replace cron's entries
9 1 5 cron.daily nice run-parts --report /etc/cron.daily
10 7 10 cron.weekly nice run-parts --report /etc/cron.weekly
11 @monthly 15 cron.monthly nice run-parts --report /etc/cron.monthh
"/etc/anacrontab" 12L, 395C
|
|
#~
.aptitude/ file1 hard_link .links2/ .ssh/ .bash_history file10 inittab london .vim/ .bash_profile file123 kharkov Mail/ .viminfo .bashrc file2 kiev .mc/ .vimrc dir1/ file3 .l3rc new .w3m/ dir2/ file6 .lesshst pariz wilen123 dir4/ file8 .lilalo/ passwd wilen124 dir5/ file9 link .profile york |
|
#anacron -e
anacron: invalid option: e type: `anacron -h' for more information |
|
#anacron -h
Usage: anacron [-s] [-f] [-n] [-d] [-q] [-t anacrontab] [-S spooldir] [job] ...
anacron [-S spooldir] -u [job] ...
anacron [-V|-h]
anacron -T [-t anacrontab]
-s Serialize execution of jobs
-f Force execution of jobs, even before their time
-n Run jobs with no delay, implies -s
-d Don't fork to the background
-q Suppress stderr messages, only applicable with -d
-u Update the timestamps without actually running anything
-t Use this anacrontab
-V Print version information
-h Print this message
-T Test an anacrontab
-S Select a different spool directory
See the manpage for more details.
|
|
#at -t
at: option requires an argument -- 't'
Usage: at [-V] [-q x] [-f file] [-mldbv] timespec ...
at [-V] [-q x] [-f file] [-mldbv] -t time
at -c job ...
atq [-V] [-q x]
atrm [-V] job ...
batch
|
|
#man at
|
|
##at -t 2013821225
|
|
#date
Птн Авг 2 09:14:58 EEST 2013 |
|
#apt-get install
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 65 пакетов не обновлено. |
|
#^C
|
|
#apt-get install ntpdate
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Будут установлены следующие дополнительные пакеты: lockfile-progs НОВЫЕ пакеты, которые будут установлены: lockfile-progs ntpdate обновлено 0, установлено 2 новых пакетов, для удаления отмечено 0 пакетов, и 65 пакетов не обновлено. Необходимо скачать 84,5 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 344 kB. ... Получено:2 http://ftp.ua.debian.org/debian/ squeeze/main lockfile-progs i386 0.1.15+squeeze1 [10,0 kB] Получено 84,5 kБ за 0с (325 kБ/c) Выбор ранее не выбранного пакета ntpdate. (Чтение базы данных ... на данный момент установлено 34952 файла и каталога.) Распаковывается пакет ntpdate (из файла .../ntpdate_1%3a4.2.6.p2+dfsg-1+b1_i386.deb)... Выбор ранее не выбранного пакета lockfile-progs. Распаковывается пакет lockfile-progs (из файла .../lockfile-progs_0.1.15+squeeze1_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет ntpdate (1:4.2.6.p2+dfsg-1+b1) ... Настраивается пакет lockfile-progs (0.1.15+squeeze1) ... |
|
#ntpdate pool.ntp.org
2 Aug 12:15:37 ntpdate[2886]: step time server 78.152.160.1 offset 10801.061908 sec |
|
#echo 'pora kushat' | at -t 201308021225
warning: commands will be executed using /bin/sh job 1 at Fri Aug 2 12:25:00 2013 |
|
#at -l
1 Fri Aug 2 12:25:00 2013 a root |
|
#atq
1 Fri Aug 2 12:25:00 2013 a root |
|
#atrm 1
|
|
#atq
|
|
#echo 'pora kushat' | at -t 201308021225
warning: commands will be executed using /bin/sh job 2 at Fri Aug 2 12:25:00 2013 |
|
#atq
2 Fri Aug 2 12:25:00 2013 a root |
|
#man at
|
|
#atq -v 1
atq: invalid option -- 'v'
Usage: at [-V] [-q x] [-f file] [-mldbv] timespec ...
at [-V] [-q x] [-f file] [-mldbv] -t time
at -c job ...
atq [-V] [-q x]
atrm [-V] job ...
batch
|
|
#at -v 1
syntax error. Last token seen: 1 Garbled time |
|
#man at
|
|
#at -c 1
Cannot find jobid 1 |
|
#at -c 2
#!/bin/sh # atrun uid=0 gid=0 # mail root 0 umask 22 SSH_CLIENT=192.168.15.105\ 57253\ 22; export SSH_CLIENT L3_PARENT_TTY=/dev/pts/3; export L3_PARENT_TTY L3_TAMPERED_EDITORS=\ vi\ vim\ pico\ nano; export L3_TAMPERED_EDITORS SSH_TTY=/dev/pts/0; export SSH_TTY USER=root; export USER TERMCAP=SC\|screen\|VT\ 100/ANSI\ X3.64\ virtual\ terminal:\\" ... "\ :%i=\\E[1\;2C:kh=\\E[1\~:@1=\\E[1\~:kH=\\E[4\~:@7=\\E[4\~:\\" "\ :kN=\\E[6\~:kP=\\E[5\~:kI=\\E[2\~:kD=\\E[3\~:ku=\\EOA:kd=\\EOB:\\" "\ :kr=\\EOC:kl=\\EOD:km:; export TERMCAP MAIL=/var/mail/root; export MAIL PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin; export PATH L3_SESSION_ID=2793517913312787934-1375417772; export L3_SESSION_ID STY=1282.pts-0.debian2; export STY PWD=/root; export PWD EDITOR=vim; export EDITOR LANG=ru_RU.UTF-8; export LANG |
|
#date
Птн Авг 2 12:22:55 EEST 2013 |
|
#date
Птн Авг 2 12:24:07 EEST 2013 |
|
#date
Птн Авг 2 12:24:09 EEST 2013 |
|
#date
Птн Авг 2 12:24:10 EEST 2013 |
|
#date
Птн Авг 2 12:24:11 EEST 2013 |
|
#date
Птн Авг 2 12:24:11 EEST 2013 |
|
#date
Птн Авг 2 12:24:12 EEST 2013 |
|
#date
Птн Авг 2 12:24:13 EEST 2013 |
|
#date
Птн Авг 2 12:24:15 EEST 2013 |
|
#date
Птн Авг 2 12:24:16 EEST 2013 |
|
#date
Птн Авг 2 12:24:18 EEST 2013 |
|
#date
Птн Авг 2 12:24:19 EEST 2013 |
|
#date
Птн Авг 2 12:24:21 EEST 2013 |
|
#date
Птн Авг 2 12:24:26 EEST 2013 |
|
#date
Птн Авг 2 12:24:29 EEST 2013 |
|
#date
Птн Авг 2 12:24:30 EEST 2013 |
|
#date
Птн Авг 2 12:24:41 EEST 2013 |
|
#date
Птн Авг 2 12:24:47 EEST 2013 |
|
#date
Птн Авг 2 12:24:53 EEST 2013 |
|
#date
Птн Авг 2 12:24:57 EEST 2013 |
|
#date
Птн Авг 2 12:25:06 EEST 2013 |
|
#tail -f /var/log/messages
Aug 2 08:06:56 debian2 logger: gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh Aug 2 08:06:56 debian2 logger: nobody:x:65534:65534:nobody:/nonexistent:/bin/sh Aug 2 08:06:56 debian2 logger: libuuid:x:100:101::/var/lib/libuuid:/bin/sh Aug 2 08:06:56 debian2 logger: Debian-exim:x:101:103::/var/spool/exim4:/bin/false Aug 2 08:06:56 debian2 logger: statd:x:102:65534::/var/lib/nfs:/bin/false Aug 2 08:06:56 debian2 logger: user:x:1000:1000:user,,,:/home/user:/bin/bash Aug 2 08:06:56 debian2 logger: sshd:x:103:65534::/var/run/sshd:/usr/sbin/nologin Aug 2 08:06:56 debian2 logger: telnetd:x:104:106::/nonexistent:/bin/false Aug 2 08:06:56 debian2 logger: vasya:x:1001:1001:vasya lubit banany:/home/vasya:/bin/bash Aug 2 08:06:56 debian2 logger: princ:x:1003:1003::/home/princ:/bin/sh :q ^[[A^C |
|
#tail -f /var/log/daemon.log
Aug 2 06:19:13 debian2 acpid: starting up with netlink and the input layer Aug 2 06:19:13 debian2 acpid: 1 rule loaded Aug 2 06:19:13 debian2 acpid: waiting for events: event logging is off ^C |
|
#date
Птн Авг 2 13:31:36 EEST 2013 |
|
#lynx kernel.org
|
|
#ls
dir1 dir5 file123 file6 hard_link kiev Mail passwd york dir2 file1 file2 file8 inittab link new wilen123 dir4 file10 file3 file9 kharkov london pariz wilen124 |
|
#ls /usr/src/
install |
|
#cd
|
|
#ls
dir1 dir5 file123 file6 hard_link kiev Mail passwd york dir2 file1 file2 file8 inittab link new wilen123 dir4 file10 file3 file9 kharkov london pariz wilen124 |
|
#ls -l
итого 60 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir1 drwxr-xr-x 2 root root 4096 Июл 29 13:53 dir2 drwxrwxrwx 6 user vasya 4096 Июл 29 13:55 dir4 drw-r-xr-x 2 root root 4096 Июл 29 13:57 dir5 -rwxr-xr-x 1 root root 74 Июл 31 14:04 file1 -rw-r--r-- 1 root root 251 Июл 29 16:47 file10 -rw-r--r-- 1 root root 0 Июл 29 14:26 file123 -rw-r--r-- 1 root root 35 Июл 30 13:42 file2 -rw-r--r-- 1 root root 1373 Июл 29 14:32 file3 ... -rw-r--r-- 1 root root 0 Июл 30 13:31 kiev lrwxrwxrwx 1 root root 5 Июл 29 14:46 link -> file9 -rw-r--r-- 1 root root 0 Июл 30 13:31 london drwx------ 2 root root 4096 Июл 31 11:50 Mail -rw-r--r-- 1 root root 0 Июл 30 13:31 new -rw-r--r-- 1 root root 0 Июл 30 13:31 pariz -rw-r--r-- 1 root root 994 Июл 29 16:53 passwd -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen123 -rw-r--r-- 1 root root 24 Июл 29 16:52 wilen124 -rwxr-xr-t 1 vasya user 0 Июл 30 13:31 york |
|
#ls -la|less
|
|
#find ~ -name *linux*
|
|
#ls /tmp/
file |
|
#ls /tmp/file
/tmp/file |
|
#find / -name *linux*
/usr/bin/linux64 /usr/bin/linux32 /usr/bin/i486-linux-gnu-g++ /usr/bin/i486-linux-gnu-cpp /usr/bin/i486-linux-gnu-cpp-4.4 /usr/bin/linux-boot-prober /usr/bin/i486-linux-gnu-gcc-4.4 /usr/bin/i486-linux-gnu-g++-4.4 /usr/bin/i486-linux-gnu-gcc |