Журнал лабораторных работ

Содержание

Журнал

Среда (10/22/14)

/dev/pts/0
14:53:21
#ls
student  user
14:53:22
#tail -20 user
From root@based-debian.net.nt Wed Oct 22 15:52:06 2014
Return-path: <root@based-debian.net.nt>
Envelope-to: user@based-debian.net.nt
Delivery-date: Wed, 22 Oct 2014 15:52:06 +0300
Received: from root by debian1.net.nt with local (Exim 4.80)
        (envelope-from <root@based-debian.net.nt>)
        id 1XgvOY-0003UM-59
        for user@based-debian.net.nt; Wed, 22 Oct 2014 15:52:06 +0300
Date: Wed, 22 Oct 2014 15:52:06 +0300
To: user@based-debian.net.nt
Subject: Privet user
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <E1XgvOY-0003UM-59@debian1.net.nt>
From: root <root@based-debian.net.nt>
privet
14:53:30
#cd

14:53:46
#cat hello.sh
#!/bin/bash
for c_user in $*
   do
        echo privet | mail -s "Privet $c_user" $c_user
   done
14:53:52
#test -d 1

прошло 30 минут
15:24:46
#test -d d1

15:24:55
#echo $?
1
15:25:12
#ls
hello.sh  install  ip  i_p  passwd  source  Tux.jpg  wget.txt  words  xargs.txt
15:25:41
#ls -a
.   .aptitude      .bash_profile  hello.sh  ip   .l3rc     .lilalo  passwd    source   .vim      .vimrc    words
..  .bash_history  .bashrc        install   i_p  .lesshst  .links2  .profile  Tux.jpg  .viminfo  wget.txt  xargs.txt
15:25:47
#test i_p

15:28:42
#echo $?
0
15:28:45
#test -d i_p

15:28:51
#echo $?
1
15:28:53
#[ -d i_p ]

15:29:08
#echo $?
1
15:29:10
#[ i_p ]

15:29:14
#echo $?
0
15:29:16
#cp no_file /tmp
cp: не удалось выполнить stat для «no_file»: Нет такого файла или каталога
прошло 20 минут
15:50:06
#echo $?
1
15:50:27
#touch no_file

15:50:40
#cp no_file /tmp/

15:50:48
#echo$?
l3script: echo0: команда не найдена
15:50:54
#echo $?
127
15:50:57
#cp no_file /tmp/test 5 -gt 1
cp: неверный ключ -- g
Попробуйте «cp --help» для получения более подробного описания.
15:51:32
#test 5 -gt 1

15:51:48
#test 5 -lt 1

15:51:56
#echo $?
1
15:51:57
#test -z "$STRING"

15:52:20
#echo $?
0
15:52:21
#test "$P" !=print
l3script: test: : ожидается использование унарного оператора
15:53:21
#test -e /etc/motd

15:53:52