cheat sheet for linux and unix
A small Linux cheat sheet, introducing the very basic and very essential commands for surviving at the Linux CLI.
Moving around in the file system
Command
Action
pwd
"Print working directory" - show what dir you're in.
ls
List the contents of a dir.
ls -l
List the contents of a dir and show additional info of the files.
ls -a
List all files, including hidden files.
cd
Change directory.
cd ..
Go to the parent directory.
Examining files
Command
Action
file
Determine the type of a file.
cat
Concatenate a file.
less
View text files and paginate them if needed.
Manipulating files and directories
Command
Action
cp
Copy a file.
cp -i
Copy a file and ask before overwriting.
cp -r
Copy a directory with its contents.
mv
Move or rename a file.
mv -i
Move or rename a file and ask before overwriting.
rm
Remove a file.
rm -r
Remove a directory with its contents.
rm -i
Ask before removing a file. Good to use with the -r option.
mkdir
Make a directory.
rmdir
Remove an empty directory.
rpm command cheat sheet for Linux
rpm is a powerful Package Manager for Red Hat, Suse and Fedora Linux. It can be used to build, install, query, verify, update, and remove/erase individual software packages. A Package consists of an archive of files, and package information, including name, version, and description:
Syntax
Description
Example(s)
rpm -ivh {rpm-file}
Install the package
rpm -ivh mozilla-mail-1.7.5-17.i586.rpm
rpm -ivh --test mozilla-mail-1.7.5-17.i586.rpm
rpm -Uvh {rpm-file}
Upgrade package
rpm -Uvh mozilla-mail-1.7.6-12.i586.rpm
rpm -Uvh --test mozilla-mail-1.7.6-12.i586.rpm
rpm -ev {package}
Erase/remove/ an installed package
rpm -ev mozilla-mail
rpm -ev --nodeps {package}
Erase/remove/ an installed package without checking for dependencies
rpm -ev --nodeps mozilla-mail
rpm -qa
Display list all installed packages
rpm -qa
rpm -qa | less
rpm -qi {package}
Display installed information along with package version and
相关文档:
一 安装DHCP服务器
1.先查看系统是否安装DHcp
#rpm -qa|grep dhcp
2.安装RPM包,如果是Rea Hat LInux9安装包在第二章光盘,挂在了光驱后可用查找命令找DHCP包
#find /mnt/cdrom/ -name "dhcp"
3.查看find命令搜出来的文件路径进行安装
#rpm -ivh/mnt/cdrom/RedHat/RPMS/dhcp*/dhcpd*(根据自己实际文件路径)
4. ......
先粘贴一个linux最简单的驱动,其实对于一个从2.4玩上来的人来说,驱动不复杂,比较不习惯的是那个makefile
驱动本身:
hello.c:
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(vodi){
&nbs ......
Linux
下
C
开发——
gcc
,
gdb
的使用
作者:
zccst
我们学习的过程应该是一个积累的过程,有无到有,又少到多,而不能像下山的猴子。
9
月份的时候是第一次系统学习
gcc, gdb, makefile
(详见前面博客)。如今作为嵌入式系统的一个组成部分,决定重学一次,感觉理解加深了一些。
gcc
......
至今,Linux桌面问世已有十个年头.回顾以往,一事无成,不堪回首.此话怎讲?
大约在10年前,美国Corel公司最早开始追求一个梦想:在Linux基础上给用户提供一个工作桌面(即最早的Linux桌面),这就是Corel的WordPerfect文字处理程序.记得,大概在1999年的寒冬,在北京展览馆举办的那次"北京国 ......
卸载Mysql
[root@localhost ~]# rpm -qa | grep mysql
mysql-3.23.58-9
php-mysql-4.3.4-11
mod_auth_mysql-20030510-4.1
mysql-server-3.23.58-9
说明:rpm –qa | grep mysql 命令是为了把mysql相关的包都列出来,卸载都从最下面的一个包开始,直到卸载掉第一个为止。执行rpm -q php,如果返回php版本, ......