Linux: How to Count Number of File in a Directory
Execute this command: $ ls -1 /home/user | wc -l
Execute this command: $ ls -1 /home/user | wc -l
Update Feb 23: to install only MRTG and SNMP please read this article. Install MRTG, Apache2, Squid and SNMP $ sudo apt-get install apache2 snmpd mrtg snmp-mibs-downloader squid Configure SNMP Backup /etc/snmp/snmpd.conf $ sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak Create new /etc/snmp/snmpd.conf $ sudo nano /etc/snmp/snmpd.conf and key in these lines: rocommunity public syslocation “Bukit Batok”…
Below is shell script to load Windows’ folder share using Ubuntu 10.10: —
This is my little note on web hosting setup. – Install Ubuntu Server 10.10 – Setup static private IP address – Install ehcp hosting control panel: ehcp.net – Configure ehcp: add domain, add ftp user, modify ehcp dns template, modify external IP – Upload website source code – Import website database – Install smbfs: apt-get…
The following function will pad number with leading zero(es). function pad(number, length) { var str = ” + number; while (str.length < length) { str = ‘0’ + str; } return str; } Some code to test the function: document.write(pad(1, 1) + ”); document.write(pad(1, 2) + ”); document.write(pad(15, 2) + ”); document.write(pad(1, 3) + ”);…
To enable IIS 6.0 to run 32-bit applications on 64-bit Windows: 1. Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory. 2. Type the following command: cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 true 3. Press ENTER.
This tutorial applies for Grub version 1. Using Ubuntu Live CD, here are the steps: 1. Open terminal, run grub $ sudo grub 2. On grub command prompt, find boot record grub> find /boot/grub/stage1 or, if result an error, change to: grub> find /grub/stage1 3. Make root. Change X,Y with the number of partition from…
To change the effect of Ctrl+Alt+Backspace in any flavour of Ubuntu you can follow these steps: 1) Install the “dontzap” package sudo apt-get install dontzap 2) Open Terminal or Konsole and type: sudo dontzap –enable or sudo dontzap –disable Where “disable” means that Ctrl+Alt+Backspace restarts the xserver, while “enable” means that it won’t.
If you come across this error after running aptitude update or clicking reload button in Synaptic: W: GPG error: http://ppa.launchpad.net intrepid Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 58403026387EE263 W: You may want to run apt-get update to correct these problems due to a missing GPG key…
1. Search for virtualbox group id, make sure you already put your username under vboxusers group: $ cat /etc/group .. vboxusers:x:122:kumkum .. 2. Add this line to /etc/fstab: none /proc/bus/usb usbfs devgid=122,devmode=664 0 0 3. Reboot system. Finish. Try plug your usb device to VirtualBox. Note: – devgid=122 is vboxusers group id which is taken…