`
textboy
  • 浏览: 20349 次
  • 性别: Icon_minigender_1
  • 来自: 广州
最近访客 更多访客>>
社区版块
存档分类
最新评论

CMD List [3]

阅读更多

1.1         gunzip

 

Restores a gzipped file to its normal size. The gunzip command also restores files compressed with compress or pack.

 

Syntax             gunzip [-c] [-f] [-r] [-v]  filenames

 

Option or argument

Function

-c

Sends the uncompressed file to standard output (usually the screen) instead of to a new file; the original file is unchanged. (This is the same as using zcat.)

-f

Forces uncompression, even if a file with the same name already exists.

-h

help

-r

Recursive; If any of the file names are directories, gunzip descends into the directory (and any of its subdirectories) and uncompresses all the files it finds there.

-S

use suffix .xxx on compressed files

-v

Verbose; displays how much each file is being expanded.

filenames

Specifies the gzipped files to uncompress.

 

Sample:

 

If you want to see what’s in the compressed file facts, type:

 

gunzip -h

gunzip –c facts

gunzip -S .zip ctp_bsct006_01_datadict.txt.zip

 

1.2         gzip

 

Compresses one or more files into one gzipped file so that it takes up less space on your disk. The compressed file has the same name as the original, but with the suffix .gz attached. When your want to get your original files back, you use gunzip or gzip –d.

 

Syntax             gunzip [-c] [-d] [-f] [-l] [-r] [-v]  filenames

 

Option or argument

Function

-c

Sends the gzipped file to standard output (usually the screen) instead of to a new file; the original file is unchanged.

-d

Decompresses; the same as using gunzip.

-f

Forces compression, even if a gzipped file already exists.

-h

help

-l

Displays how much the gzipped file(s) shrank.

-r

Recursive; If any of the file names are directories, gzip descends into the directory (and any of its subdirectories) and compresses all the files it finds there.

-S

use suffix .xxx on compressed files

-v

Verbose; displays how much each file is being shrunk.

filenames

Specifies the file(s) to compress.

 

Sample:

 

You have created a series of very large files and have put them inside a directory called My_Big_Files. Now you want to save all these files in a compressed format to save space. Type

 

gzip -h

gzip –rv My_Big_Files

gzip -S .zip ctp_bsct006_01_datadict.txt (normally use this one. If "gzip -S .zip xxx.txt" in AIX, can’t unzip the file in windows or MF.)

 

1.3         head

Show the first part of files. v.s. tail.

e.g. head -5 xxx

1.4         history

 

Lists the last 20 or so commands you typed. In Korn shell, "alias history=fc -l".

 

Syntax             history

 

To execute the last command again, type r.

 

1.5         id

 

Tells you what your numeric user and group Ids are and, BSD, which groups you’re in. You can use it when you want to know your user and group Ids so that you can tell your wizard what they are when you ask for help.

 

Syntax             id

 

1.6         jobs

 

Lists the jobs that are running in either the foreground or the background or those that are stopped.

 

Syntax             jobs

 

1.7         kill

 

Cancels a job that you don’t want to continue.

 

Syntax             kill %job

  or

         kill [-9] pid

 

Option or argument

Function

job

Specifies the job that you want to kill. You can use the job number listed by the jobs command or a percent sign (%) and the first few letter a of the program that’s running.

-9

Tells kill to show no mercy in killing the program; kill it no matter what. Useful if milder measures failed.

pid

Specifies the process ID of the job. You can use the ps command to find out the job’s process ID.

 

Samples:

 

If a program is truly out of control, Ctrl+C may not stop it. In this case, you may have find out it process ID(pid) to kill it. Use the ps command to see its pid(4444, for example) and then type:

 

kill –9 4444

 

You begin running a program called big.report and realize that you did something wrong. You stop the job by pressing Ctrl+Z; the message Stopped is displayed. To kill the program, type

 

kill %big

 

1.8         last

show using situation of recent users.

Syntax             last [-n] [-f file] [-t tty] [-h] [-i IP] [-l] [-y] [ID]

 

1.9         ls

 

Lists the files in a directory.

 

Syntax             ls [-a] [-l] [r] [R] [pathname]

         ls [-acdlrRsStuX] [-size] [-sort=time] [-sort=extension]

 

Option or argument

Function

-1

Show files as single-column list.

-a

List all files and subdirectories, including hidden files (those with names that begin with a dot).

-e

Display number of links, owner, group, size (in bytes), time of last modification, and name of each file.

-F

Indicate file types; / = directory, * = executable.

-g

Displays the same information as the -l flag, except the -g flag suppresses display of the owner and symbolic link info.

-l

Displays detailed information about each file and directory, including permissions, owners, size, and when the file was last modified.

-m

Show files as comma-separated list.

-r

Displays files in reverse order.

-s

Gives size in kilobytes (including indirect blocks) for each entry.

-R

Includes the contents of all subdirectories, too.

-t

Sorts by time of last modification instead of by name.

*

e.g. ls xxx*, like dir xxx* in DOS.

 

Samples:

 

ls –l or

 

ls –l |more to display the information one page each time.

 

ls -R *axmh* (but if data is too much, ls -R will not work)

ls [a,b]*

 

1.10     lsgroup

Syntax             lsgroup <group name>

分享到:
评论

相关推荐

    CMDCMD命令CMD命令

    14. `tlist` 和 `kill`:这两个命令是用于查看和结束进程的,通常在系统调试和故障排除中使用。 15. `del` 和 `move`:文件管理命令,`del`用于删除文件,`/S /Q`选项可以递归删除目录及其内容而不提示,`move`用于...

    cmd管道技术向cmd发送字符

    如`dir /b | sort &gt; list.txt` 会排序目录中的文件并保存到`list.txt`,然后可以使用`fc /l list.txt list_sorted.txt` 比较排序前后的差异。 3. **统计分析**:`find`命令可以计数特定字符或字符串。如`type file....

    sqlcmd 参数详解

    * -L [ c ] list servers [ clean output ]:列出服务器。 * -p [ 1 ] print statistics [ colon format ]:打印统计信息。 * -X [ 1 ]:禁用命令、启动脚本和环境变量。 * -? show syntax summary:显示语法摘要。 ...

    java javascript 调用命令行 cmd

    List&lt;String&gt; commands = Arrays.asList("cmd", "/c", "dir"); ProcessBuilder pb = new ProcessBuilder(commands); Process process = pb.start(); ``` **JavaScript调用命令行** 在JavaScript中,由于安全...

    CMD网络命令大全123

    ##### 3. **`net start/stop`** - **查看已启动的服务**: ```cmd net start ``` 显示当前系统中已经启动的所有服务。 - **启动服务**: ```cmd net start 服务名 ``` 启动指定的服务,例如启动telnet...

    Qt调用CMD启动外部程序Demo.zip

    在压缩包内的`Test-cmd`和`build-Test-cmd-Desktop_Qt_5_9_3_MSVC2015_64bit-Debug`文件夹中,`Test-cmd`很可能是源代码目录,包含Qt项目的主文件和相关源码,而`build-...`目录是使用CMake构建生成的临时目录,包含...

    qt调用cmd命令和dll例子

    process.start("cmd.exe", QStringList() ); process.waitForFinished(); ``` 这里的`start`方法启动了CMD进程,并通过`/c`参数传递了执行"dir"命令的指令。`waitForFinished`确保我们等待命令执行完成后再继续执行...

    linux 离线安装perl-IPC-Cmd

    6. `perl-Module-CoreList-2.76.02-299.el7_9.noarch.rpm`: 显示Perl核心模块的版本信息,帮助确定哪些模块已经包含在当前Perl版本中。 7. `perl-version-0.99.07-6.el7.x86_64.rpm`: 为Perl处理版本号提供支持,...

    cmd中的重定向输出,管道

    ### CMD中的重定向输出与管道操作详解 在日常的编程工作中,特别是在Windows环境下进行开发时,熟练掌握CMD命令行工具的使用技巧对于提高工作效率是非常有帮助的。本文将重点介绍CMD中的重定向输出(`&gt;`、`&gt;&gt;`)...

    静态编译的trace-cmd,x86版本,v3.1.4

    2. **事件选择**: `trace-cmd list`可以列出所有可用的内核事件,用户可以根据需求选择要追踪的事件。 3. **查看日志**: `trace-cmd report`命令将追踪数据转化为可读的报告,帮助分析系统行为。 4. **保存/加载**...

    C# 传入自定义列表List 到Oracle存储过程

    cmd.Parameters.Add(new OracleParameter("p_list", oraArray)); cmd.ExecuteNonQuery(); ``` 5. **关闭连接**: 执行完存储过程后,别忘了关闭数据库连接。 通过这种方式,C#中的自定义列表(List)可以高效地...

    遍历CheckBoxList,获得选中项的值动态绑定CheckBoxList代码

    ### 遍历CheckBoxList,获得选中项的值动态绑定CheckBoxList #### 知识点一:CheckBoxList概述及应用场景 **CheckBoxList** 是ASP.NET Web Forms中一个非常有用的控件,它允许用户选择一个或多个选项。CheckBoxList...

    常用的一些cmd命令

    #### 3. **服务管理** - `net start`:启动一个服务,如`net start telnet`启动telnet服务。 - `net stop`:停止一个服务。 - `net time`:查看或同步远程计算机的时间。 #### 4. **网络信息查询** - `...

    java调用cmd创建目录和复制文件

    3. 异常处理和错误检查 4. 操作系统兼容性考虑 5. 安全编码实践 在实际项目中,如果频繁进行此类操作,建议使用Java的I/O和NIO库,或者第三方库如Apache Commons IO,它们提供了更为高级和安全的文件操作接口。

    cmd应用大全,经典不容错过

    - `tlist -t` 列出系统中的所有进程,`kill -F 进程名` 强制结束进程(需要安装额外工具)。 5. **文件操作**: - `del` 命令用于删除文件,`del /F 文件名` 可删除只读文件,`del /S /Q 目录` 删除指定目录下的...

    Linux系统firewall-cmd 命令详解.docx

    * firewall-cmd --zone=dmz --list-ports 这将显示 dmz zone 中所有打开的端口。 firewall-cmd 命令还可以用于添加端口到 zone,例如: * firewall-cmd --zone=dmz --add-port=8080/tcp 这将添加 8080 端口到 ...

    CMD快速操作

    - `tlist -t`:列出系统进程(需额外安装工具)。 - `kill -F`:强制结束进程(同样需要额外安装工具)。 掌握这些CMD命令,可以帮助用户高效地进行系统管理和网络操作,尤其是在没有图形用户界面的情况下。了解...

    CMD命令(自己的收藏啊)

    16. `tlist -t`和`kill -F`: 分别用于列出和结束进程,通常在Support Tools中。 17. `del`和`rmdir`: 用于删除文件和目录,`-F`选项可删除只读文件,`/S`和`/Q`分别用于删除目录及其内容,且不提示确认。 18. `...

    CMD常用命令.txt

    3. **-j host-list**: 松散源路由列表。 4. **-w timeout**: 等待每个 ICMP 回复的超时时间。 **示例:** ``` tracert -d www.example.com ``` 此命令追踪到 `www.example.com` 的路径,并不尝试将 IP 地址解析为...

Global site tag (gtag.js) - Google Analytics