Deletes (removes) a directory.
Syntax rmdir directory
Option or argument
|
Function
|
Directory
|
Specifies the directory you want to delete. (The directory must be empty already.)
|
To delete a directory and all the files in it, you can use the rm –ir command (see rm, earlier in this section). You cannot delete the current working directory, so move to its parent (by typing cd..) before deleting a directory.
Syntax sleep Seconds
Option or argument
|
Function
|
-b
|
|
-c
|
|
-d
|
|
-f
|
|
-k
|
|
-m
|
|
-n
|
|
-o
|
|
-r
|
|
-tCharacter
|
|
-u
|
|
su [-] [ username [ arg...]]
su become another user without logging off. The default user name is root (superuser). If (-) add can prevent the exception of $PATH. ( it is forbidden in some system as it can log in with root account)
e.g.
su - user2
replace string.
sub (regexp,replacement_string,in_string), success return 1, not found return 0.
show the last part of files. v.s. head.
Option or argument
|
Function
|
-f
|
|
e.g. tail -100 xxx - cut the last 100 lines of xxx
1. Changes the date and time of a file without changing the file’s contents; 2. Create files.
Syntax touch [-a] [-c] [-m] [-t date] filenames
Option or argument
|
Function
|
-a
|
|
-c
|
|
-m
|
|
-t date
|
|
Filenames
|
|
If you leave out the date, touch changes the files’ date and time to today, right now.
Removes alias definitions. v.s. alias.
change binary files into ascII files.
Remove duplicate entries ONLY if they are adjacent.
Option or argument
|
Function
|
-c
|
|
-d
|
|
-u
|
|
e.g.
who | awk '{print $1}' | sort | uniq -c
To see who is logged on and what they’re doing.
Counting words or lines.
Option or argument
|
Function
|
-w
|
|
-l
|
|
-c
|
|
e.g. wc –l xxx; tail -1 test.sh |wc
locate files in the system. Refer find.
Syntax whereis [-bmsu] [-BMS folder_name -f] file_name
1.14 which
Locates a program file, including aliases and paths. e.g. > which pwd (response: > /usr/bin/pwd)
Tells you who else is using this computer.
Syntax who [-q] [ami]
Option or argument
|
Function
|
-q
|
|
-m, am i
|
|
-u,i
|
|
Similar
w, users
Constructs parameter lists and runs commands.
e.g.
find /hsbc/rlse_bcn/objects -type f | xargs rm
分享到:
相关推荐
14. `tlist` 和 `kill`:这两个命令是用于查看和结束进程的,通常在系统调试和故障排除中使用。 15. `del` 和 `move`:文件管理命令,`del`用于删除文件,`/S /Q`选项可以递归删除目录及其内容而不提示,`move`用于...
隐藏 CMD 黑窗口的脚本通常用于在运行批处理文件或其他命令行程序时,避免显示命令提示符窗口,这样可以让用户在后台执行脚本而不会干扰到其他任务。 该文件需配合BAT脚本使用,在.vbs中将路径指向BAT脚本并运行该...
如`dir /b | sort > list.txt` 会排序目录中的文件并保存到`list.txt`,然后可以使用`fc /l list.txt list_sorted.txt` 比较排序前后的差异。 3. **统计分析**:`find`命令可以计数特定字符或字符串。如`type file....
List<String> commands = Arrays.asList("cmd", "/c", "dir"); ProcessBuilder pb = new ProcessBuilder(commands); Process process = pb.start(); ``` **JavaScript调用命令行** 在JavaScript中,由于安全...
* -L [ c ] list servers [ clean output ]:列出服务器。 * -p [ 1 ] print statistics [ colon format ]:打印统计信息。 * -X [ 1 ]:禁用命令、启动脚本和环境变量。 * -? show syntax summary:显示语法摘要。 ...
##### 5. **`net view`** - **查看本地局域网共享**: ```cmd net view ``` 显示本地局域网内的共享资源列表。 - **查看远程计算机的共享**: ```cmd net view IP ``` 显示指定远程计算机上的共享资源。...
在压缩包内的`Test-cmd`和`build-Test-cmd-Desktop_Qt_5_9_3_MSVC2015_64bit-Debug`文件夹中,`Test-cmd`很可能是源代码目录,包含Qt项目的主文件和相关源码,而`build-...`目录是使用CMake构建生成的临时目录,包含...
process.start("cmd.exe", QStringList() ); process.waitForFinished(); ``` 这里的`start`方法启动了CMD进程,并通过`/c`参数传递了执行"dir"命令的指令。`waitForFinished`确保我们等待命令执行完成后再继续执行...
### CMD中的重定向输出与管道操作详解 在日常的编程工作中,特别是在Windows环境下进行开发时,熟练掌握CMD命令行工具的使用技巧对于提高工作效率是非常有帮助的。本文将重点介绍CMD中的重定向输出(`>`、`>>`)...
5. `perl-Locale-Maketext-1.23-3.el7.noarch.rpm`: 为Perl提供国际化(i18n)和本地化(l10n)支持,使得程序可以适应不同地区的语言环境。 6. `perl-Module-CoreList-2.76.02-299.el7_9.noarch.rpm`: 显示Perl...
2. **事件选择**: `trace-cmd list`可以列出所有可用的内核事件,用户可以根据需求选择要追踪的事件。 3. **查看日志**: `trace-cmd report`命令将追踪数据转化为可读的报告,帮助分析系统行为。 4. **保存/加载**...
cmd.Parameters.Add(new OracleParameter("p_list", oraArray)); cmd.ExecuteNonQuery(); ``` 5. **关闭连接**: 执行完存储过程后,别忘了关闭数据库连接。 通过这种方式,C#中的自定义列表(List)可以高效地...
### 遍历CheckBoxList,获得选中项的值动态绑定CheckBoxList #### 知识点一:CheckBoxList概述及应用场景 **CheckBoxList** 是ASP.NET Web Forms中一个非常有用的控件,它允许用户选择一个或多个选项。CheckBoxList...
#### 5. **进程与通信管理** - `net pause`:暂停一个服务。 - `netsend`:发送消息到另一台计算机。 - `netstat`:查看网络连接状态和统计信息。 - `nbtstat`:显示基于TCP/IP的NetBIOS的统计数据和连接信息。 ...
在Java编程中,有时我们需要执行一些系统级别的操作...5. 安全编码实践 在实际项目中,如果频繁进行此类操作,建议使用Java的I/O和NIO库,或者第三方库如Apache Commons IO,它们提供了更为高级和安全的文件操作接口。
* firewall-cmd --zone=dmz --list-ports 这将显示 dmz zone 中所有打开的端口。 firewall-cmd 命令还可以用于添加端口到 zone,例如: * firewall-cmd --zone=dmz --add-port=8080/tcp 这将添加 8080 端口到 ...
- `tlist -t`:列出系统进程(需额外安装工具)。 - `kill -F`:强制结束进程(同样需要额外安装工具)。 掌握这些CMD命令,可以帮助用户高效地进行系统管理和网络操作,尤其是在没有图形用户界面的情况下。了解...
16. `tlist -t`和`kill -F`: 分别用于列出和结束进程,通常在Support Tools中。 17. `del`和`rmdir`: 用于删除文件和目录,`-F`选项可删除只读文件,`/S`和`/Q`分别用于删除目录及其内容,且不提示确认。 18. `...