Changes between Version 3 and Version 4 of Csle2022/Agenda/linuxhandson
- Timestamp:
- Nov 27, 2022, 8:22:53 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Csle2022/Agenda/linuxhandson
v3 v4 234 234 235 235 {{{ 236 * file: The file utility determines the file type. Linux does not use extensions to determine the file type. The command line does not care whether a file ends in .txt or .pdf. As a system administrator, you should use the file command to determine the file type. 236 * file: The file utility determines the file type. Linux does not use extensions to determine the file type. The command line does not care whether a file ends in .txt or .pdf. 237 As a system administrator, you should use the file command to determine the file type. 237 238 * cp: To copy a file, use cp with a source and a target argument. 238 239 * cp -r: To copy complete directories, use cp -r (the -r option forces recursive copying of all files in all subdirectories). 239 240 * cp -i: To prevent cp from overwriting existing files, use the -i (for interactive) option. 240 241 * mv: Use to rename a file or to move the file to another directory. 241 * rm: Use to remove files *rm -i:To prevent yourself from accidentally removing a file. *rm -rf:rm -r will not remove non-empty directories. However, rm accepts several options that will allow you to remove any directory. The rm -rf will erase anything 242 * rm: Use to remove files *rm -i:To prevent yourself from accidentally removing a file. *rm -rf:rm -r will not remove non-empty directories. 243 However, rm accepts several options that will allow you to remove any directory. The rm -rf will erase anything 242 244 }}} 243 245 {{{ 244 246 Dangerous Command 245 247 246 When you are logged on as root, be very careful with rm -rf (the f means force and the r means recursive) since being root implies that permissions don't apply to you. You can literally erase your entire file system by accident. 248 When you are logged on as root, be very careful with rm -rf (the f means force and the r means recursive) since being root implies that permissions don't apply to you. 249 You can literally erase your entire file system by accident. 247 250 248 251 • less:The less command is useful for displaying files that take up more than one screen