// mysql
select col from tbl limit 20;
// Oracle
select col from tbl where rownum<=20;
// Microsoft SQL
select top 20 col from tbl;
Friday, October 8, 2010
Thursday, September 30, 2010
How to create set the hostname in Linux Redhat
% vi /etc/sysconfig/network file
Modify HOSTNAME key
HOSTNAME="your preferred hostname"
restart network service with following command
% service network restart
Modify HOSTNAME key
HOSTNAME="your preferred hostname"
restart network service with following command
% service network restart
Wednesday, September 29, 2010
How to query the size of the directory and subdirectory
list usage of all files
tsongl@guiness $ du -a
4 ./test1/eee
8 ./test1
4 ./abc
4 ./cde
20 .
summarize of directory and subdirectory
tsongl@guiness $ du -s
20 .
tsongl@guiness $ du -a
4 ./test1/eee
8 ./test1
4 ./abc
4 ./cde
20 .
summarize of directory and subdirectory
tsongl@guiness $ du -s
20 .
Subscribe to:
Posts (Atom)