Chủ Nhật, 23 tháng 2, 2014

Find The Largest Top 10 Files and Directories On a Linux / UNIX / BSD?

How Do I Find The Largest Top 10 Files and Directories On a Linux / UNIX / BSD?

Sometime it is necessary to find out what file(s) or directories are eating up all your disk space. Further, it may be necessary to find out it at the particular location such as /tmp or /var or /home.

Type the following command at the shell prompt to find out top 10 largest file/directories:
# du -a /var | sort -n -r | head -n 10
 du -ah /var | sort -rh | head -n 10
Sample outputs:
1008372 /var
313236  /var/www
253964  /var/log
192544  /var/lib
152628  /var/spool
152508  /var/spool/squid
136524  /var/spool/squid/00
95736   /var/log/mrtg.log
74688   /var/log/squid
62544   /var/cache
 
If you want more human readable output try:
$ cd /path/to/some/where
$ du -hsx * | sort -rh | head -10
Where,

    du command -h option : display sizes in human readable format (e.g., 1K, 234M, 2G).
    du command -s option : show only a total for each argument (summary).
    du command -x option : skip directories on different file systems.
    sort command -r option : reverse the result of comparisons.
    sort command -h option : compare human readable numbers. This is GNU sort specific option only.
    head command -10 OR -n 10 option : show the first 10 lines.

The above command will only work of GNU/sort is installed. Other Unix like operating system should use the following version (see comments below):

 
for i in G M K; do du -ah | grep [0-9]$i | sort -nr -k 1; done | head -n 11
 

Sample outputs:

179M .
84M ./uploads
57M ./images
51M ./images/faq
49M ./images/faq/2013
48M ./uploads/cms
37M ./videos/faq/2013/12
37M ./videos/faq/2013
37M ./videos/faq
37M ./videos
36M ./uploads/faq

Find the largest file in a directory and its subdirectories using find comamnd

Type the following GNU/find command:

## Warning: only works with GNU find ##
find /path/to/dir/ -printf '%s %p\n'| sort -nr | head -10
find . -printf '%s %p\n'| sort -nr | head -10
 

Sample outputs:

5700875 ./images/faq/2013/11/iftop-outputs.gif
5459671 ./videos/faq/2013/12/glances/glances.webm
5091119 ./videos/faq/2013/12/glances/glances.ogv
4706278 ./images/faq/2013/09/cyberciti.biz.linux.wallpapers_r0x1.tar.gz
3911341 ./videos/faq/2013/12/vim-exit/vim-exit.ogv
3640181 ./videos/faq/2013/12/python-subprocess/python-subprocess.webm
3571712 ./images/faq/2013/12/glances-demo-large.gif
3222684 ./videos/faq/2013/12/vim-exit/vim-exit.mp4
3198164 ./videos/faq/2013/12/python-subprocess/python-subprocess.ogv
3056537 ./images/faq/2013/08/debian-as-parent-distribution.png.bak

You can skip directories and only display files, type:

 
find /path/to/search/ -type f -printf '%s %p\n'| sort -nr | head -10
 

OR

 
find /path/to/search/ -type f -iname "*.mp4" -printf '%s %p\n'| sort -nr | head -10 
Read More

Cpanel Restart Services

Cpanel Restart Services

 By default, you may restart the following services via WHM:
  •     DNS nameserver (named/BIND or NSD)
  •     FTP Server (ProFTPd or Pure-FTPd)
  •     HTTP web server (Apache/httpd)
  •     POP3/IMAP email server (Courier or Dovecot)
  •     POP3 server (cPPOP)
  •     Mail server (Exim)
  •     SQL server (MySQL)
  •     SSH server (openSSH)
Restarting a service will not work if the service is stopped. If you wish to start or stop a service, refer to the Service Manager feature in WHM.

To restart a service:
  •     On the main Restart Services screen, select the service you wish to restart.
  •     When asked whether you wish to restart the service, click Yes. 

Restart from the command line 

Important: If you use IPv6, the service network restart command will remove the IPv6 addresses from the network device. To restart your IPv6 configuration, you must run the /etc/init.d/cpipv6 restart command after you restart the network service.

exim mail transfer agent (mta). /usr/local/cpanel/scripts/restartsrv exim
bind nameserver daemon. /usr/local/cpanel/scripts/restartsrv named
proftp ftp server daemon. /usr/local/cpanel/scripts/restartsrv proftpd
pure-ftp ftp server daemon. /usr/local/cpanel/scripts/restartsrv pureftpd
apache web server daemon. /usr/local/cpanel/scripts/restartsrv httpd
courier mail server daemon. /usr/local/cpanel/scripts/restartsrv courier
dovecot mail server daemon. /usr/local/cpanel/scripts/restartsrv dovecot
system logs daemon. /usr/local/cpanel/scripts/restartsrv syslogd
clam antivirus software daemon. /usr/local/cpanel/scripts/restartsrv clamd
secure shell (ssh) daemon /usr/local/cpanel/scripts/restartsrv sshd
common unix superserver daemon responsible for managing internet services. /usr/local/cpanel/scripts/restartsrv inetd
cpanel’s version of pop3 mail downloading service. similar to imap. /usr/local/cpanel/scripts/restartsrv cppop
imap mail downloading service. similar to pop3. /usr/local/cpanel/scripts/restartsrv imapd
mysql database server. /usr/local/cpanel/scripts/restartsrv mysql
postgresql database server. /usr/local/cpanel/scripts/restartsrv postgresql
interchange e-commerce server. /usr/local/cpanel/scripts/restartsrv interchange
java servlet container and http server. /usr/local/cpanel/scripts/restartsrv tomcat
chat service. /usr/local/cpanel/scripts/restartsrv entropychat

Restart directly from the command line
 If this does not work, you can attempt to restart the service directly. The location of the service depends upon your operating system; however, for many distributions, services are located in the /etc/init.d/ directory.

 

Read More

Thứ Sáu, 21 tháng 2, 2014

.htaccess Rewriting CodeIgniter URLs on Apache 2.4 and mod_fastcgi_handler (FCGI)

.htaccess Rewriting CodeIgniter URLs on Apache 2.4 and mod_fastcgi_handler (FCGI)

CodeIgniter had some problems with mod_rewrite on a shared hosting account where the hoster runs
Apache + FCGI
When you tried to use CI’s SEO URLs, you'll get an error 'No input file specified'.

And the solution here:
Create an .htaccess file in the same directory with index.php and paste into it:

RewriteEngine On
# Existing files and directories remain accessible
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.* - [L]

# Redirect the rest
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [QSA,L]

Other solution :
Create a customized PHP.INI file under the root directory of your site with the following line.

cgi.fix_pathinfo = 0;


Read More

Thứ Năm, 13 tháng 2, 2014

Download CentOS 6.5 x64 ISO DVD FULL

Download CentOS 6.5 x64 ISO DVD FULL


See More Version in here





DVD1

CentOS-6.5-x86_64-bin-DVD1.iso.001
CentOS-6.5-x86_64-bin-DVD1.iso.002
CentOS-6.5-x86_64-bin-DVD1.iso.003
CentOS-6.5-x86_64-bin-DVD1.iso.004
CentOS-6.5-x86_64-bin-DVD1.iso.005
CentOS-6.5-x86_64-bin-DVD1.iso.006
CentOS-6.5-x86_64-bin-DVD1.iso.007
CentOS-6.5-x86_64-bin-DVD1.iso.008
CentOS-6.5-x86_64-bin-DVD1.iso.009
CentOS-6.5-x86_64-bin-DVD1.iso.010
CentOS-6.5-x86_64-bin-DVD1.iso.011
CentOS-6.5-x86_64-bin-DVD1.iso.012
CentOS-6.5-x86_64-bin-DVD1.iso.013
CentOS-6.5-x86_64-bin-DVD1.iso.014
CentOS-6.5-x86_64-bin-DVD1.iso.015
CentOS-6.5-x86_64-bin-DVD1.iso.016
CentOS-6.5-x86_64-bin-DVD1.iso.017
CentOS-6.5-x86_64-bin-DVD1.iso.018
CentOS-6.5-x86_64-bin-DVD1.iso.019
CentOS-6.5-x86_64-bin-DVD1.iso.020
CentOS-6.5-x86_64-bin-DVD1.iso.021
CentOS-6.5-x86_64-bin-DVD1.iso.022
CentOS-6.5-x86_64-bin-DVD1.iso.023
CentOS-6.5-x86_64-bin-DVD1.iso.024
CentOS-6.5-x86_64-bin-DVD1.iso.025
CentOS-6.5-x86_64-bin-DVD1.iso.026
CentOS-6.5-x86_64-bin-DVD1.iso.027
CentOS-6.5-x86_64-bin-DVD1.iso.028
CentOS-6.5-x86_64-bin-DVD1.iso.029
CentOS-6.5-x86_64-bin-DVD1.iso.030
CentOS-6.5-x86_64-bin-DVD1.iso.031
CentOS-6.5-x86_64-bin-DVD1.iso.032
CentOS-6.5-x86_64-bin-DVD1.iso.033
CentOS-6.5-x86_64-bin-DVD1.iso.034
CentOS-6.5-x86_64-bin-DVD1.iso.035
CentOS-6.5-x86_64-bin-DVD1.iso.036
CentOS-6.5-x86_64-bin-DVD1.iso.037
CentOS-6.5-x86_64-bin-DVD1.iso.038
CentOS-6.5-x86_64-bin-DVD1.iso.039

DVD2
CentOS-6.5-x86_64-bin-DVD2.iso.001
CentOS-6.5-x86_64-bin-DVD2.iso.002
CentOS-6.5-x86_64-bin-DVD2.iso.003
CentOS-6.5-x86_64-bin-DVD2.iso.004
CentOS-6.5-x86_64-bin-DVD2.iso.005
CentOS-6.5-x86_64-bin-DVD2.iso.006
CentOS-6.5-x86_64-bin-DVD2.iso.007
CentOS-6.5-x86_64-bin-DVD2.iso.008
CentOS-6.5-x86_64-bin-DVD2.iso.009
CentOS-6.5-x86_64-bin-DVD2.iso.010
CentOS-6.5-x86_64-bin-DVD2.iso.011
CentOS-6.5-x86_64-bin-DVD2.iso.012
Read More

Download Ghost Windows 7 64bit FULL Driver and Software

Download Ghost Windows 7 64bit FULL Driver and Software



Who should use:

-The computer has 4GB of RAM or more

-You are a person who uses graphics programs, games

File include:

-Windows 7 64bit

-Full Driver and Software





Link download



Win7x64_FullSofts_songngoc.GHO.001
Win7x64_FullSofts_songngoc.GHO.002
Win7x64_FullSofts_songngoc.GHO.003
Win7x64_FullSofts_songngoc.GHO.004
Win7x64_FullSofts_songngoc.GHO.005
Win7x64_FullSofts_songngoc.GHO.006
Win7x64_FullSofts_songngoc.GHO.007
Win7x64_FullSofts_songngoc.GHO.008
Win7x64_FullSofts_songngoc.GHO.009
Win7x64_FullSofts_songngoc.GHO.010
Win7x64_FullSofts_songngoc.GHO.011
Win7x64_FullSofts_songngoc.GHO.012
Win7x64_FullSofts_songngoc.GHO.013
Win7x64_FullSofts_songngoc.GHO.014
Win7x64_FullSofts_songngoc.GHO.015
Win7x64_FullSofts_songngoc.GHO.016
Win7x64_FullSofts_songngoc.GHO.017
Win7x64_FullSofts_songngoc.GHO.018
Win7x64_FullSofts_songngoc.GHO.019
Win7x64_FullSofts_songngoc.GHO.020
Win7x64_FullSofts_songngoc.GHO.021
Win7x64_FullSofts_songngoc.GHO.022
Win7x64_FullSofts_songngoc.GHO.023
Win7x64_FullSofts_songngoc.GHO.024
Win7x64_FullSofts_songngoc.GHO.025
Win7x64_FullSofts_songngoc.GHO.026
Win7x64_FullSofts_songngoc.GHO.027
Win7x64_FullSofts_songngoc.GHO.028
Win7x64_FullSofts_songngoc.GHO.029
Win7x64_FullSofts_songngoc.GHO.030
Win7x64_FullSofts_songngoc.GHO.031
Win7x64_FullSofts_songngoc.GHO.032
Win7x64_FullSofts_songngoc.GHO.033
Win7x64_FullSofts_songngoc.GHO.034
Win7x64_FullSofts_songngoc.GHO.035
Win7x64_FullSofts_songngoc.GHO.036
Win7x64_FullSofts_songngoc.GHO.037
Win7x64_FullSofts_songngoc.GHO.038
Win7x64_FullSofts_songngoc.GHO.039
Win7x64_FullSofts_songngoc.GHO.040
Win7x64_FullSofts_songngoc.GHO.041
Win7x64_FullSofts_songngoc.GHO.042
Win7x64_FullSofts_songngoc.GHO.043
Win7x64_FullSofts_songngoc.GHO.044
Win7x64_FullSofts_songngoc.GHO.045
Win7x64_FullSofts_songngoc.GHO.046
Win7x64_FullSofts_songngoc.GHO.047
Win7x64_FullSofts_songngoc.GHO.048
Win7x64_FullSofts_songngoc.GHO.049
Win7x64_FullSofts_songngoc.GHO.050
Win7x64_FullSofts_songngoc.GHO.051
Win7x64_FullSofts_songngoc.GHO.052
Win7x64_FullSofts_songngoc.GHO.053
Win7x64_FullSofts_songngoc.GHO.054
Win7x64_FullSofts_songngoc.GHO.055
Win7x64_FullSofts_songngoc.GHO.056
Win7x64_FullSofts_songngoc.GHO.057
Win7x64_FullSofts_songngoc.GHO.058
Win7x64_FullSofts_songngoc.GHO.059
Win7x64_FullSofts_songngoc.GHO.060
Win7x64_FullSofts_songngoc.GHO.061
Win7x64_FullSofts_songngoc.GHO.062
Win7x64_FullSofts_songngoc.GHO.063
Win7x64_FullSofts_songngoc.GHO.064
Read More