Some useful linux commands
These are mostly used linux commands I applied daily, I paste it here once it is useful for you.
1. |
Permanently set the Environment Variables |
classpath=” ” export classpath |
|
2. |
To see the hardware configuration |
cat /proc/cpuinfo |
|
3. |
Tar commands |
tar –xvvzf myfile.tar.gz // to leave the .tar.gz unchanged |
|
tar –pczf myfile.tar.gz /path/... // to compress |
|
gzip –c test.text>test.gz |
|
tar –xvvf myfile.tar // to extract |
|
4. |
To change the login user name |
su username |
|
5. |
To see the size of file or directory |
du –skh filename |
|
6. |
To show the disk space |
df -h |
|
6. |
Copy files from one computer to another |
scp myfile username@xxx.xxx.xxx:c:/ scp myfile username@xxx.xxx.xxx:/opt/ // where xxx is the hostname of target computer |
|
7. |
To see the CUP and Memory usage |
top |
|
8. |
Vi commands |
vi myfile.config // to view the file |
|
:q // to exit |
|
:q! // to exit witout the change |
|
:wq // to exit with change |
|
:cw // change word |
|
:cc // change a line |
|
9. |
Make a backup file |
cp –b myfile1 myfile2 |
|
10. |
Create direcory |
mkdir mydirectory |
|
11. |
Set file permission |
chmod 777 mybatch.sh |
|
12. |
To check the OS |
cat /etc/redhat-release |
|
13. |
Force to delete the directory |
rm –rf direcory |
|
14. |
Search for a file name |
find . –name myfile |
|
15. |
Start Xwin X server |
Start Cygwin Bash Shell cd /usr/x11R6/bin ./startxwin.bat |
|
16. |
View IP Address |
hostname -i |
|
17. |
View and kill Processes |
ps: to view processes kill -9 process id |
|
18. |
Copy the entire directory |
cp -R dir/ newdir/ |
|
19. |
View port |
Netstat –an | grep 9081 Netstat –an > /tmp/port.out |
Some useful linux commands相关推荐
- The Linux commands you need!
从网上看到的,还可以.挺基础的还有些技巧性的. After half a year of linux, I have some post-it memo's sticked to my monitor ...
- The 10 Most Important Linux Commands/10个最经常使用的命令行
1. ls 命令:to show all of the major directiories filed under a given file system. for example: ls /app ...
- 执行在一行中组合多个Linux命令
本文翻译自:Execute combine multiple Linux commands in one line I am trying to merge multiple linux comman ...
- linux一切皆文件之tty字符设备(深入理解sshd创建pty的过程) (五)
一.知识准备 1.在linux中,一切皆为文件,所有不同种类的类型都被抽象成文件(比如:块设备,socket套接字,pipe队列) 2.操作这些不同的类型就像操作文件一样,比如增删改查等 3.块设备支 ...
- Linux基础书籍推荐
学习Linux还是以Red Hat Enterprise Linux这一基础版本比较好,它的再编译版本CentOS在服务器操作系统中占很大的比重.而且现在很多软件都推出了虚拟机模板,大都是Red Ha ...
- S5PV210开发 -- Linux dd命令
如需转载请注明出处:https://blog.csdn.net/qq_29350001/article/details/78475434 昨天群里有人询问,为什么破坏 BootLoader 破坏不掉. ...
- Linux命令Find实例
转自: http://www.tecmint.com/35-practical-examples-of-linux-find-command/ 35 Practical Examples of Lin ...
- linux ls in*,35 ls Command Examples in Linux (The Complete Guide)
Do you know how to list contents (files/directories) in Linux? It's straightforward. In this article ...
- linux实现shell,linux
4.5M http://www.starbase-929.net/media/Calibre%20Library/Ken%20O.%20Bartch/Linux%20Shell%20Scription ...
最新文章
- 深度解读:人体防御病毒的免疫力究竟是什么?
- yum源的超级简单配置
- 关于微型计算机主板的描述错误的是,2016年9月计算机一级考试试题及答案「单选」...
- 愤怒的小鸟【$DP$优化】
- Java JDK11快速下载地址
- 内存区域的划分和分配
- CRM attachment read old API debug
- 扫地机器人隔板_【扫地机器人使用】_摘要频道_什么值得买
- thinkphp框架起步认识
- 【Python】实现输出成绩最高或最低分的学生姓名以及低于平均分的学生姓名
- 关于oracle的certview
- java中d怎样转换D,如何将ZonedDateTime转换为date?
- leetcode之回文链表
- android画图 旋转 地球*月球,unity3d怎么实现地球太阳月球转动-unity3d实现地球太阳月球转动的方法 - 河东软件园...
- mysql省市联动_sql全国 省市 联动级联
- WPF动画——故事板(Storyboard)
- Rocketmq广播消费模式怎么扩展消费者
- ionic自定义图标(ion-icon)
- cannot find -lnl
- ImageNet Classification with Deep Convolutional Neural Networks(AlexNet论文翻译(附原文))
热门文章
- 计算机网络管理存在薄弱环节,计算机网络管理思考
- Jmeter - JMeter监听器 -上篇(详解教程)
- 大唐杯5G练习题(二)
- K8S、kubernetes no resolver defined to resolve could not be resolved (3: Host not found) 问题解决
- Java如何获取IP属地 ip2region failed to create searcher with x:java.io.FileNotFoundException:( 系统找不到指定的路径)
- iphone长截图哪个软件好_亲身体验过13款滚动截屏App,谁才是最好用的iPhone长截屏工具?...
- Demo---progress-steps------ 2/50(详解)
- Antlr Tool与antlr runtime的版本一致性问题
- hashmap底层逻辑
- BCB数据库构件用法的总结