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中搭建WEBLOGIC应用服务器的环境下,有时可能同时发布多个war包,而且每一个war包的文件数目很多,或者客户同时访问量比较大,此时WEBLOGIC就会报错,报错信息中包含“Too many open files”,例如:
java.io.FileNotFoundException: /home/weblogic/bea/user_projects/domains/lhyth/server ......
Linux 正在嵌入式开发领域稳步发展。因为 Linux 使用 GPL(请参阅本文后面的参考资料
),所以任何对将 Linux 定制于
PDA、掌上机或者可佩带设备感兴趣的人都可以从因特网免费下载其内核和应用程序,并开始移植或开发。许多 Linux 改良品种迎合了嵌入式/实时市场。它们包括
RTLinux(实时 Linux)、uclinux( ......
卸载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版本, ......
使用VM安装虚拟系统,真的很方便。可以让个人轻松拥有一个网络,并包含有很多中系统。
因此,如何让这些系统直接享用原来系统上的文件就显得很重要了。。
这里就是讲通过安装VM-Tools来实现虚拟系统与原系统之间的文件共享的。
1.运行VM,启动你的虚拟LINUX系统。
2.切换到原系统,选择VM中的VM菜单----Install VMWare ......
1
、安装前的准备
1.1
检查硬件
物理内存:
# grep
MemTotal /proc/meminfo
交换空间:
# grep
SwapTotal /proc/meminfo
交换空间的大小是根据物理内存的大小来设置的,物理内存少于
2G
的则交换空间设为物理内存的两倍,物理内存大于
2G
的则交换空间和物理内存大小一样。如果不符合上述规定,那么就需要 ......