linux 的基本用法

作者: 山豆山豆 | 来源:发表于2017-01-06 23:21 被阅读0次

类 Unix 系统下的一些常用命令和用法。

实用命令

fuser

查看文件被谁占用。

fuser -u .linux.md.swp

id

查看当前用户、组 id。

lsof

查看打开的文件列表。

An open file may be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file (Internet socket, NFS file or UNIX domain socket.) A specific file or all the files in a file system may be selected by path.

查看网络相关的文件占用

lsof -i

查看端口占用

lsof -i tcp:5037

查看某个文件被谁占用

lsof .linux.md.swp

查看某个用户占用的文件信息

lsof -u mazhuang

-u 后面可以跟 uid 或 login name。

查看某个程序占用的文件信息

lsof -c Vim

注意程序名区分大小写。

相关文章

  • linux 的基本用法

    类 Unix 系统下的一些常用命令和用法。 实用命令 fuser 查看文件被谁占用。 id 查看当前用户、组 id...

  • adb 实际工作高频用法

    adb 命令和 Linux 命令用法很相似,通过 adb shell 进入命令行后,用法基本和linux命令没有什...

  • 压缩解压缩

    linux zip命令的基本用法是: zip [参数] [打包后的文件名] [打包的目录路径] linux zip...

  • zip unzip

    linux zip命令的基本用法是: zip [参数] [打包后的文件名] [打包的目录路径] linux zip...

  • Linux下mv命令高级用法

    mv 也是 Linux 下一个使用频率非常高的命令,但除了一些基本用法,你还知道它的哪些高级用法呢? 1. 基本用...

  • curl 命令

    命令:curl 例子: 1、基本用法 # curl http://www.linux.com 执行后,www.li...

  • Matplotlib

    Matplotlib安装 MacOS Linux 基本用法 Module的导入: 画出一条直线: 使用plt.fi...

  • Linux thread 最基本用法

    要用到线程,但对线程一直不怎么懂,看了些资料作了两个例子和总结,不对的地方恳请各位指正。[喝小酒的网摘]http:...

  • Linux下systemctl基本用法

    Linux下systemctl基本用法 systemctl和systemd的关系 systemd是系统管理的守护进...

  • 【转】grep 参数详解

    【Linux命令】 grep命令基本用法 转载successdm 最后发布于2019-05-12 21:18:22...

网友评论

    本文标题:linux 的基本用法

    本文链接:https://www.haomeiwen.com/subject/odwxbttx.html