Một số cuốn sách PHP- Some PHP Books.

(hoặc http://www.delete.vn )

Advance PHP Programming
http://www.mediafire.com/?ozm5dmzndug

Ajax and PHP building  Responsive Application

http://www.mediafire.com/download.php?5nqziefjmyy

Buiding PHP ang MySQL 5 from Novice to Profession

http://www.mediafire.com/?ddcdjzqy0oe

Beginning PHP Apahe MySQL WebDevelopment

http://www.mediafire.com/?m0gwgqemvny

Core Web Application Development with PHP and MySQL

http://www.mediafire.com/?izuuzznz1oz

Không download đươcxin mời xem:

Sửa lỗi download được từ Mediafire

Các lệnh trong Linux Bash từ a – z

alias    Create an alias
apropos  Search Help manual pages (man -k)
awk      Find and Replace text, database sort/validate/index
break    Exit from a loop
builtin  Run a shell builtin
bzip2    Compress or decompress named file(s)
 
cal      Display a calendar
case     Conditionally perform a command
cat      Display the contents of a file
cd       Change Directory
cfdisk   Partition table manipulator for Linux
chgrp    Change group ownership
chmod    Change access permissions
chown    Change file owner and group
chroot   Run a command with a different root directory
cksum    Print CRC checksum and byte counts
clear    Clear terminal screen
cmp      Compare two files
comm     Compare two sorted files line by line
command  Run a command - ignoring shell functions
continue Resume the next iteration of a loop
cp       Copy one or more files to another location
cron     Daemon to execute scheduled commands
crontab  Schedule a command to run at a later time
csplit   Split a file into context-determined pieces
cut      Divide a file into several parts
 
date     Display or change the date & time
dc       Desk Calculator
dd       Data Dump - Convert and copy a file
ddrescue Data recovery tool
declare  Declare variables and give them attributes
df       Display free disk space
diff     Display the differences between two files
diff3    Show differences among three files
dig      DNS lookup
dir      Briefly list directory contents
dircolors Colour setup for `ls'
dirname  Convert a full pathname to just a path
dirs     Display list of remembered directories
du       Estimate file space usage
 
echo     Display message on screen
egrep    Search file(s) for lines that match an extended expression
eject    Eject removable media
enable   Enable and disable builtin shell commands
env      Environment variables
ethtool  Ethernet card settings
eval     Evaluate several commands/arguments
exec     Execute a command
exit     Exit the shell
expand   Convert tabs to spaces
export   Set an environment variable
expr     Evaluate expressions
 
false    Do nothing, unsuccessfully
fdformat Low-level format a floppy disk
fdisk    Partition table manipulator for Linux
fgrep    Search file(s) for lines that match a fixed string
file     Determine file type
find     Search for files that meet a desired criteria
fmt      Reformat paragraph text
fold     Wrap text to fit a specified width.
for      Expand words, and execute commands
format   Format disks or tapes
free     Display memory usage
fsck     File system consistency check and repair
ftp      File Transfer Protocol
function Define Function Macros
 
gawk     Find and Replace text within file(s)
getopts  Parse positional parameters
grep     Search file(s) for lines that match a given pattern
groups   Print group names a user is in
gzip     Compress or decompress named file(s)
 
hash     Remember the full pathname of a name argument
head     Output the first part of file(s)
history  Command History
hostname Print or set system name
 
id       Print user and group id's
if       Conditionally perform a command
ifconfig Configure a network interface
import   Capture an X server screen and save the image to file
install  Copy files and set attributes
 
join     Join lines on a common field
 
kill     Stop a process from running
 
less     Display output one screen at a time
let      Perform arithmetic on shell variables
ln       Make links between files
local    Create variables
locate   Find files
logname  Print current login name
logout   Exit a login shell
look     Display lines beginning with a given string
lpc      Line printer control program
lpr      Off line print
lprint   Print a file
lprintd  Abort a print job
lprintq  List the print queue
lprm     Remove jobs from the print queue
ls       List information about file(s)
lsof     List open files
 
make     Recompile a group of programs
man      Help manual
mkdir    Create new folder(s)
mkfifo   Make FIFOs (named pipes)
mkisofs  Create an hybrid ISO9660/JOLIET/HFS filesystem
mknod    Make block or character special files
more     Display output one screen at a time
mount    Mount a file system
mtools   Manipulate MS-DOS files
mv       Move or rename files or directories
 
netstat  Networking information
nice     Set the priority of a command or job
nl       Number lines and write files
nohup    Run a command immune to hangups
nslookup Query Internet name servers interactively
 
passwd   Modify a user password
paste    Merge lines of files
pathchk  Check file name portability
ping     Test a network connection
popd     Restore the previous value of the current directory
pr       Prepare files for printing
printcap Printer capability database
printenv Print environment variables
printf   Format and print data
ps       Process status
pushd    Save and then change the current directory
pwd      Print Working Directory
 
quota    Display disk usage and limits
quotacheck Scan a file system for disk usage
quotactl Set disk quotas
 
ram      ram disk device
rcp      Copy files between two machines.
read     read a line from standard input
readonly Mark variables/functions as readonly
remsync  Synchronize remote files via email
return   Exit a shell function
rm       Remove files
rmdir    Remove folder(s)
rsync    Remote file copy (Synchronize file trees)
 
screen   Terminal window manager
scp      Secure copy (remote file copy)
sdiff    Merge two files interactively
sed      Stream Editor
select   Accept keyboard input
seq      Print numeric sequences
set      Manipulate shell variables and functions
sftp     Secure File Transfer Program
shift    Shift positional parameters
shopt    Shell Options
shutdown Shutdown or restart linux
sleep    Delay for a specified time
sort     Sort text files
source   Run commands from a file `.'
split    Split a file into fixed-size pieces
ssh      Secure Shell client (remote login program)
strace   Trace system calls and signals
su       Substitute user identity
sum      Print a checksum for a file
symlink  Make a new name for a file
sync     Synchronize data on disk with memory
 
tail     Output the last part of files
tar      Tape ARchiver
tee      Redirect output to multiple files
test     Evaluate a conditional expression
time     Measure Program running time
times    User and system times
touch    Change file timestamps
top      List processes running on the system
traceroute Trace Route to Host
trap     Run a command when a signal is set(bourne)
tr       Translate, squeeze, and/or delete characters
true     Do nothing, successfully
tsort    Topological sort
tty      Print filename of terminal on stdin
type     Describe a command
 
ulimit   Limit user resources
umask    Users file creation mask
umount   Unmount a device
unalias  Remove an alias
uname    Print system information
unexpand Convert spaces to tabs
uniq     Uniquify files
units    Convert units from one scale to another
unset    Remove variable or function names
unshar   Unpack shell archive scripts
until    Execute commands (until error)
useradd  Create new user account
usermod  Modify user account
users    List users currently logged in
uuencode Encode a binary file 
uudecode Decode a file created by uuencode
 
v        Verbosely list directory contents (`ls -l -b')
vdir     Verbosely list directory contents (`ls -l -b')
vi       Text Editor
 
watch    Execute/display a program periodically
wc       Print byte, word, and line counts
whereis  Report all known instances of a command    
which    Locate a program file in the user's path. 
while    Execute commands
who      Print all usernames currently logged in
whoami   Print the current user id and name (`id -un')
Wget     Retrieve web pages or files via HTTP, HTTPS or FTP
 
xargs    Execute utility, passing constructed argument list(s)
yes      Print a string until interrupted
 
.        Run a command script in the current shell
Source:http://www.ss64.com/bash/index.html

Các lệnh Shell cơ bản trong Linux

Khi mở một shell, bạn cần đến tài khoản kích hoạt vào thư mục chủ (thông thường nằm trong /home/tên_người_dùng).

Chú ý rằng mỗi lệnh đều có nhiều tùy chọn riêng của mình. Để xem các tùy chọn cho một lệnh cụ thể, đơn giản bạn chỉ cần gõ “man <command>” (trong đó: man là từ khóa; command là tên lệnh). Một điểm quan trọng cần chú ý là trong các hệ điều hành Linux, câu lệnh có phân biệt chữ hoa, chữ thường. “A” sẽ được hệ điều hành hiểu là khác so với “a”.

Để vào hệ thống file, dùng:

pwd: đưa ra ngoài màn hình thư mục đang hoạt động (ví dụ: /etc/ssh).

cd: thay đổi thư mục (ví dụ: cd .. – ra một cấp thư mục hiện tại; cd vidu – vào thư mục /vidu).

ls: đưa ra danh sách nội dung thư mục.

mkdir: tạo thư mục mới (mkdir tên_thumuc).

touch: tạo file mới (touch ten_file).

rmdir: bỏ một thư mục (rmdir ten_thumuc).

cp: copy file hoặc thư mục (cp file_nguồn file_đích).

mv: di chuyển file hoặc thư mục; cũng được dùng để đặt lại tên file hoặc thư mục (mv vị_trí_cũ vị_trí_mới hoặc mv tên_cũ tên_mới).

rm: loại bỏ file (rm tên_file).

Để tìm kiếm file, bạn có thể dùng:

find <tiêu chuẩn tìm kiếm>: dùng cho các tên file.

grep < tiêu chuẩn tìm kiếm>: để tìm nội dung trong file.

Để xem một file, bạn có thể dùng:

more <tên file>: hiển thị file theo từng trang.

cat < tên file>: hiển thị tất cả file.

head < tên file>: hiển thị các dòng đầu tiên.

tail < tên file>: hiển thị các dòng cuối cùng (có thể hữu ích trong những trường hợp như khi bạn muốn xem thông tin cuối cùng của một file hệ thống).

Để chính sửa file, bạn phải sử dụng trình soạn thảo tích hợp sẵn trên dòng lệnh. Thông thường, đây là vi và được dùng với cú pháp: vi <tên file>.

Để giải nén một lưu trữ (thông thường có đuôi tar.gz), bạn phải dùng lệnh tar với cú pháp tar -xvf <tên_file>.

Để in một file, dùng lệnh lpr <tên_file>. Chú ý là bạn phải có một số daemon hoạt động để quản lý máy in. Thông thường đây là các cup (chủ yếu là UNIX Printing System) có thể sử dụng cho tất cả các phân phối chính.

Để loại bỏ file khỏi hàng đợi ở máy in (bạn có thể lên danh sách hàng đợi bằng lệnh lpq), sử dụng câu lệnh lprm <tên_file>.

Để lắp hoặc gỡ bỏ thiết bị (thêm vào hệ thống file với vai trò như một phương tiện được phép sử dụng), dùng:

mount /mnt/floppy: lắp thêm ổ mềm.

umount /mnt/floppy: gỡ bỏ ổ mềm.

mount /mnt/cdrom: lắp ổ CD-ROM.

mount /mnt/cdrom: gỡ ổ DC-ROM.

Các thiết bị này thường được cài và cho phép sử dụng một cách tự động. Nhưng có thể một ngày đẹp trời nào đó bạn lại phải tự mình thực hiện công việc này khi có lỗi xảy ra. Đừng lo lắng!

Để tạo một phân vùng

Đầu tiên, tạo một thư mục trong /mnt (mkdir /mnt/ổ_đĩa_mới). Sau đó sử dụng lệnh mount (mount /dev/source /mnt/ ổ_đĩa_mới), trong đó /dev/source là thiết bị (tức phân vùng) bạn muốn lắp thêm vào hệ thống file.

Nếu muốn kết nối tới một host từ xa, sử dụng lệnh ssh. Cú pháp là ssh <tên_host>.

Quản lý hệ thống:

ps: hiển thị các chương trình hiện thời đang chạy (rất hữu ích: ps là cái nhìn toàn bộ về tất cả các chương trình).

Trong danh sách đưa ra khi thực hiện lệnh ps, bạn sẽ thấy có số PID (Process identification – nhân dạng tiến trình).

Con số này sẽ được hỏi đến khi muốn ngừng một dịch vụ hay ứng dụng, dùng lệnh kill <PID>.

top: hoạt động khá giống như Task Manager trong Windows. Nó đưa ra thông tin về tất cả tài nguyên hệ thống, các tiến trình đang chạy, tốc độ load trung bình… Lệnh top -d <delay> thiết lập khoảng thời gian làm tươi lại hệ thống. Bạn có thể đặt bất kỳ giá trị nào, từ .1 (tức 10 mili giây) tới 100 (tức 100 giây) hoặc thậm chí lớn hơn.

uptime: thể hiện thời gian của hệ thống và tốc độ load trung bình trong khoảng thời gian đó, trước đây là 5 phút và 15 phút.

Thông thường tốc độ load trung bình được tính toán theo phần trăm tài nguyên hệ thống (vi xử lý, RAM, ổ cứng vào/ra, tốc độ load mạng) được dùng tại một thời điểm. Nếu tốc độ được tính toán là 0.37, tức có 37% tài nguyên được sử dụng. Giá trị lớn hơn như 2.35 nghĩa là hệ thống phải đợi một số dữ liệu, khi đó nó sẽ tính toán nhanh hơn 235% mà không gặp phải vấn đề gì. Nhưng giữa các phân phối có thể khác nhau một chút.

free: hiển thị thông tin trên bộ nhớ hệ thống.

ifconfig <tên_giao_diện>: để xem thông tin chi tiết về các giao diện mạng; thông thường giao diện mạng ethernet có tên là eth(). Bạn có thể cài đặt các thiết lập mạng như địa chỉ IP hoặc bằng cách dùng lệnh này (xem man ifconfig). Nếu có điều gì đó chưa chính xác, bạn có thể stop hoặc start (tức ngừng hoặc khởi_động) giao diện bằng cách dùng lệnh ifconfig <tên_giao_diện> up/down.

passwd: cho phép bạn thay đổi mật khẩu (passwd người_dùng_sở_hữu_mật_khẩu hoặc tên người dùng khác nếu bạn đăng nhập hệ thống với vai trò root).

useradd: cho phép bạn thêm người dùng mới (xem man useradd).

Dù ở phân phối nào, bạn cũng có thể dùng phím TAB để tự động hoàn chỉnh một lệnh hoặc tên file. Điều này rất hữu ích khi bạn quen với các lệnh. Bạn cũng có thể sử dụng các phím lên, xuống để cuộn xem các lệnh đã nhập. Bạn có thể dùng lệnh đa dòng trên một dòng. Ví dụ như, nếu muốn tạo ba thư mục chỉ trên một dòng, cú pháp có thể là: mkdir thư_mục_1 ; mkdir thư_mục_2 ; mkdir thư_mục_3.

Một điều thú vị khác nữa là các lệnh dạng pipe. Bạn có thể xuất một lệnh thông qua lệnh khác. Ví dụ: man mkdir | tail sẽ đưa ra thông tin các dòng cuối cùng trong trang xem “thủ công” của lệnh mkdir.

Nếu lúc nào đó được yêu cầu phải đăng nhập với tài khoản gốc (tức “siêu” admin của hệ thống), bạn có thể đăng nhập tạm thời bằng cách dùng lệnh su. Tham số -1 (su-1) dùng để thay đổi thư mục chủ và cho các lệnh đã hoặc đang dùng. Chú ý là bạn cũng sẽ được nhắc một mật khẩu.

Để thoát hay đóng shell, gõ exit hoặc logout.

T.Thu (Theo Tutorial)

Linux Command Cheatsheet: các lệnh Linux cơ bản

Nguồn: http://fosswire.com/wp-content/uploads/2007/08/fwunixref.pdf

More advance: http://www.cs.usfca.edu/~parrt/course/601/lectures/unix.util.html (How To Look Like A UNIX Guru)

File Commands

ls – directory listing
ls -al – formatted listing with hidden files
cd dir – change directory to dir
cd – change to home
pwd – show current directory
mkdir dir – create a directory dir
rm file – delete file
rm -r dir – delete directory dir
rm -f file – force remove file
rm -rf dir – force remove directory dir *
cp file1 file2 – copy file1 to file2
cp -r dir1 dir2 – copy dir1 to dir2; create dir2 if it doesn’t exist
mv file1 file2 – rename or move file1 to file2 if file2 is an existing directory, moves file1 into directory file2
ln -s file link – create symbolic link link to file
touch file – create or update file
cat > file – places standard input into file
more file – output the contents of file
head file – output the first 10 lines of file
tail file – output the last 10 lines of file
tail -f file – output the contents of file as it grows, starting with the last 10 lines

Process Management

ps – display your currently active processes
top – display all running processes
kill pid – kill process id pid
killall proc – kill all processes named proc *
bg – lists stopped or background jobs; resume a stopped job in the background
fg – brings the most recent job to foreground
fg n – brings job n to the foreground

File Permissions

chmod octal file – change the permissions of file
to octal, which can be found separately for user, group, and world by adding:
4 – read (r)
2 – write (w)
1 – execute (x)
Examples:
chmod 777 – read, write, execute for all
chmod 755 – rwx for owner, rx for group and world
For more options, see man chmod.

SSH

ssh user@host – connect to host as user
ssh -p port user@host – connect to host on port port as user
ssh-copy-id user@host – add your key to host for user to enable a keyed or passwordless login

Searching

grep pattern files – search for pattern in files
grep -r pattern dir – search recursively for pattern in dir
command | grep pattern – search for pattern in the output of command
locate file – find all instances of file

System Info

date – show the current date and time
cal – show this month’s calendar
uptime – show current uptime
w – display who is online
whoami – who you are logged in as
finger user – display information about user
uname -a – show kernel information
cat /proc/cpuinfo – cpu information
cat /proc/meminfo – memory information
man command – show the manual for command
df – show disk usage
du – show directory space usage
free – show memory and swap usage
whereis app – show possible locations of app
which app – show which app will be run by default

Compression

tar cf file.tar files – create a tar named file.tar containing files
tar xf file.tar – extract the files from file.tar
tar czf file.tar.gz files – create a tar with Gzip compression
tar xzf file.tar.gz – extract a tar using Gzip
tar cjf file.tar.bz2 – create a tar with Bzip2 compression
tar xjf file.tar.bz2 – extract a tar using Bzip2
gzip file – compresses file and renames it to file.gz
gzip -d file.gz – decompresses file.gz back to file

Network

ping host – ping host and output results
whois domain – get whois information for domain
dig domain – get DNS information for domain
dig -x host – reverse lookup host
wget file – download file
wget -c file – continue a stopped download

Installation

Install from source:
./configure
make
make install
dpkg -i pkg.deb – install a package (Debian)
rpm -Uvh pkg.rpm – install a package (RPM)

Shortcuts

Ctrl+C – halts the current command
Ctrl+Z – stops the current command, resume with
fg in the foreground or bg in the background
Ctrl+D – log out of current session, similar to exit
Ctrl+W – erases one word in the current line
Ctrl+U – erases the whole line
Ctrl+R – type to bring up a recent command
!! – repeats the last command
exit – log out of current session

Blog Stats

  • 38 239 hits

Blog stats

Tháng Năm 2009
H B T N S B C
 123
45678910
11121314151617
18192021222324
25262728293031

Chuyên mục

Trang

RSS VnExpress

  • Lỗi: có thể dòng không tin đang không hoạt động. Hãy thử lại sau.

RSS Sức mạnh số – Dân trí điện tử – Dantri.com.vn

  • Lỗi: có thể dòng không tin đang không hoạt động. Hãy thử lại sau.

Thank you!!

free counters