-
Search
Categories
-
Linux, PHP, LAMP, The Web in a blog- Android – how to develop directly on a phone
- Android drawable default icons – they are free to use
- Android how to read and write files
- Uncompress on the fly when copying a file from a remove location with scp
- Setting up an encrypted volume on an external hard drive on CentOS
- Linux bash – tar tricks
- Implement Selenium tests
- Using a downloaded package without IDE in Java
- CSS selectors optimisation
- Ubuntu Linux on Acer Aspire AO751h
Tag Cloud
alarm array backup begin button character commercial constants coppermine CSV DVD eclipse ecommerce email email server expect firefox font foreach formatting fstab ftp GMail gnome keyboard Lucene marketing memcached mount plugin profiling protect regexp scp Selenium SEO sftp split svn tar utf utf8 Vbulletin Virtual Server Web Dev Security
Category Archives: Linux Command Line
Linux – Cut Lines
Very useful when you pipe it, for example, for easily reading a file containing very long quries cat queries.sql | cut -b -10
MySQL – Importing Many SQL Dump Files in a Database
ls *.sql | awk ‘{printf(“mysql -u [username] -p[password] [databasename] < %s\n”, $1) | “/bin/sh” }’
Posted in Linux Command Line, MySQL
Leave a comment
Add An Entry In Fstab to Mount a Common Data Partition
Add this row into your /etc/fstab: /dev/hda6 /mnt/data auto rw,uid=1000,utf8 0 0
Linux – How To Split a Big File Into Several Small Files
split –bytes=1m /path/to/large/file /path/to/output/file/prefix You can change the output file size by changing the –bytes=1m to your preference. You can use b, k, or m. b represent bytes, k represent kilobytes, m represent megabytes. To restore the original file: cat … Continue reading
Rsync – Deploy And Increment Backup
It’s good for deploy as well. It can be used locally (like this: rsync -aHvzO –progress staging/ www/). Very useful to move big amount of data over the Internet because of its incremental feature. By default it uses SSH for … Continue reading
Linux Command Line – Bash Scripting – Some tricks
wc – print newline, word, and byte counts for each file (program for count statistics from a file) dt = $(date) ls -l > files.txt 2>error.txt Redirects standard error to a file ls -l > files.txt 2>&1 Redirects standard error … Continue reading
Posted in Linux Command Line
Leave a comment
Linux Bash – Find Out Info About Your CPU
less /proc/cpuinfo uname -a x86_64 GNU/Linux indicates I have 64bit kernel running. If you use see i386/i486/i586/i686 it is a 32 bit kernel. grep flags /proc/cpuinfo * lm means Long mode – 64 bit CPU * Real mode 16 bit … Continue reading
Posted in Linux Command Line
Leave a comment
Linux Bash – Change The Prompt
To print your current prompt: echo $PS1 To set a new prompt: PS1=”[\u@\h \w]\$” That’s very useful as it display the absolute working directory path If you want to keep this change append the previous line to this file (using … Continue reading
Posted in Linux Command Line
Leave a comment
Linux Bash – Colour the Name of Directory and Files
alias ls=’ls –color’ If you want to make this changes permanent, append the line to the file: /home/username/.bashrc
Posted in Linux Command Line
Leave a comment
Linux – Download Automatically an Entire Website
wget -k –wait=20 –limit-rate=20K –no-parent -r -p -U Mozilla http://www.symfony-project.org/api/1_1/ -k -> make the links work in the local version (very very very cool) –wait=20 –limit-rate=20K -> make our requests not too fast and band consuming…that to be fair and … Continue reading
Posted in Linux Command Line
Leave a comment
