Updates to the Linux Roadmap (#7149)
* add Practice Linux Commands with Hands-on Labs * Update public/roadmap-content/devops.json Co-authored-by: Arik Chakma <arikchangma@gmail.com> * Update public/roadmap-content/devops.json * add linux free tutorials --------- Co-authored-by: huhuhang <huhuhang@github.com> Co-authored-by: dsh <daniel.s.holdsworth@gmail.com> Co-authored-by: Arik Chakma <arikchangma@gmail.com> Co-authored-by: huhuhang <no-reply@huhuhang.com>pull/7081/head^2
parent
024c7cbda1
commit
84184724c4
29 changed files with 146 additions and 55 deletions
@ -1,15 +1,22 @@ |
||||
# Working with Files |
||||
# Working with Files |
||||
|
||||
Working with files is an essential part of Linux and it's a skill every Linux user must have. In Linux, everything is considered a file: texts, images, systems, devices, and directories. |
||||
Working with files is an essential part of Linux and it's a skill every Linux user must have. In Linux, everything is considered a file: texts, images, systems, devices, and directories. |
||||
Linux provides multiple command-line utilities to create, view, move or search files. Some of the basic commands for file handling in Linux terminal include `touch` for creating files, `mv` for moving files, `cp` for copying files, `rm` for removing files, and `ls` for listing files and directories. |
||||
|
||||
For instance, to create a file named "example.txt", we use the command: |
||||
|
||||
```bash |
||||
touch example.txt |
||||
``` |
||||
``` |
||||
|
||||
To list files in the current directory, we use the command: |
||||
|
||||
```bash |
||||
ls |
||||
``` |
||||
Knowing how to effectively manage and manipulate files in Linux is crucial for administering and running a successful Linux machine. |
||||
``` |
||||
|
||||
Knowing how to effectively manage and manipulate files in Linux is crucial for administering and running a successful Linux machine. |
||||
|
||||
Learn more from the following resources: |
||||
|
||||
- [@article@Linux Basic Files Operations](https://labex.io/tutorials/linux-basic-files-operations-270248) |
@ -1,12 +1,17 @@ |
||||
# Head Command |
||||
# Head Command |
||||
|
||||
The `head` command in Linux is a text processing utility that allows a user to output the first part (or the "head") of files. It is commonly used for previewing the start of a file without loading the entire document into memory, which can act as an efficient way of quickly examining the data in very large files. By default, the `head` command prints the first 10 lines of each file to standard output, which is the terminal in most systems. |
||||
|
||||
```bash |
||||
head file.txt |
||||
``` |
||||
|
||||
The number of output lines can be customized using an option. For example, to display first 5 lines, we use `-n` option followed by the number of lines: |
||||
|
||||
```bash |
||||
head -n 5 file.txt |
||||
``` |
||||
``` |
||||
|
||||
Learn more from the following resources: |
||||
|
||||
- [@article@Linux head Command: File Beginning Display](https://labex.io/tutorials/linux-linux-head-command-file-beginning-display-214302) |
Loading…
Reference in new issue