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
相关文档:
Linux内核提供了list这个数据结构以及操作函数。这个数据结构在内核驱动中使用广泛,而且确实方便使用。为了详细了解这个数据结构的用法,方便以后使用,把这个数据结构里面的功能都试用了一次,清楚了很多。下面是实验程序和自己得出的使用方法,请高手多多指教。 Struct list_head { struct list_head *next, *prev ;}; ......
至今,Linux桌面问世已有十个年头.回顾以往,一事无成,不堪回首.此话怎讲?
大约在10年前,美国Corel公司最早开始追求一个梦想:在Linux基础上给用户提供一个工作桌面(即最早的Linux桌面),这就是Corel的WordPerfect文字处理程序.记得,大概在1999年的寒冬,在北京展览馆举办的那次"北京国 ......
变成学习QT了...汗.
制作Hello World 到 时钟程序 ... 最多的还是熟悉组件的使用,使用而已,工具而已,大部分都是雷同的,其实我们要学的不多,也就是和VC++ 或者BC++不同的机制或者新的技巧。组件用到时候查查就OK,没必要系统的学,因为我们用不太到。
  ......
卸载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版本, ......
1
、安装前的准备
1.1
检查硬件
物理内存:
# grep
MemTotal /proc/meminfo
交换空间:
# grep
SwapTotal /proc/meminfo
交换空间的大小是根据物理内存的大小来设置的,物理内存少于
2G
的则交换空间设为物理内存的两倍,物理内存大于
2G
的则交换空间和物理内存大小一样。如果不符合上述规定,那么就需要 ......