Δημοσιεύτηκε: 29 Αύγ 2011, 11:13
από clepto
Κώδικας: Επιλογή όλων
[chris@chris-aspire5732z ~]$ ls -l .crypt_list_open
-rw-r--r-- 1 chris users 5 Aug 29 08:12 .crypt_list_open
[chris@chris-aspire5732z ~]$ rm .crypt_list_open
[chris@chris-aspire5732z ~]$ touch .crypt_list_open
[chris@chris-aspire5732z ~]$ if [ -s .crypt_list_open ]; then
> echo "This file has data"
> elif [ ! -s .crypt_list_open ]; then
> echo "This file does not have data"
> fi
This file does not have data
[chris@chris-aspire5732z ~]$ ls -l .crypt_list_open
-rw-r--r-- 1 chris users 0 Aug 29 08:12 .crypt_list_open
[chris@chris-aspire5732z ~]$ echo "test" > .crypt_list_open
[chris@chris-aspire5732z ~]$ if [ -s .crypt_list_open ]; then
> echo "This file has data"
> elif [ ! -s .crypt_list_open ]; then
> echo "This file does not have data"
> fi
This file has data
[chris@chris-aspire5732z ~]$ ls -l .crypt_list_open
-rw-r--r-- 1 chris users 5 Aug 29 08:12 .crypt_list_open
[chris@chris-aspire5732z ~]$


επιτέλους...κοίτα το δεύτερο...This file has data
αλλά γιατί έτσι;