[Linux] Frequently used Linux commands (file operation)

Write to file

Outputs the result of ">" to the file on the right. If the file does not exist, it will be created.

$ echo 'Hello World' > ./aaa.txt

Copy file

$ cp aaa.txt aaa1.txt

Delete file

$ rm aaa.txt

Check the contents of the file

$ cat aaa1.txt

Execution result,,,

Hello World

Search for files and directories

I use sudo because some files may not be viewable without administrator privileges.

$ sudo find aaa1.txt

Execution result,,,

aaa1.txt

Search for strings

You may search for "control + f", which is similar.

$ grep He aaa1.txt

Execution result,,,

Hello World

Recommended Posts

[Linux] Frequently used Linux commands (file operation)
[Linux] Frequently used Linux commands (folder operation)
Frequently used Linux commands
Frequently used Linux commands
Frequently used linux commands
Linux Frequently Used Commands [Personal Memo]
Frequently used Linux commands (for beginners)
[Linux] File and directory operation commands
List of frequently used Linux commands
[Linux] Review of frequently used basic commands 2
[Linux] Review of frequently used basic commands
Frequently used tmux commands
Linux command [File operation]
Frequently used pip commands
[Python/Django] Summary of frequently used commands (3) <Operation of PostgreSQL>
[Linux command] A memorandum of frequently used commands
[Python/Django] Summary of frequently used commands (4) -Part 2- <Production operation: Amazon EC2 (Amazon Linux 2)>
[Python/Django] Summary of frequently used commands (4) -Part 1- <Production operation: Amazon EC2 (Amazon Linux 2)>
Frequently used commands in virtualenv
Linux commands
Linux study session 2nd: File operation
Linux commands
8 Frequently Used Commands in Python Django
linux commands
Classify frequently used file / folder dialogs
Linux commands
Linux commands
[Anaconda3] Summary of frequently used commands
Summary of frequently used commands of django (beginner)
Summary of frequently used commands in matplotlib
Python + Selenium Frequently used operation method summary
[Linux] List of Linux commands used in practice
Network Linux commands
Verbalize Linux commands
Linux user commands
New Linux commands! !!
Basic LINUX commands
[Linux] File search
Various Linux commands
Typical Linux commands (7)
[Linux] Zip file compression and decompression commands [Vim]
[Python/Django] Summary of frequently used commands (2) <Installing packages>
Summary of frequently used commands (with petit commentary)
Selenium webdriver Summary of frequently used operation methods
Docker. Set frequently used commands to alias "with explanation"
[Linux] Group related commands
Linux commands to remember
Hack Linux file descriptors
A collection of commands frequently used in server management
New Linux commands! !! Part 2
Display a list of frequently used commands on Zsh
[For beginners] Django Frequently used commands and reference collection
Linux operation on Win10
Frequently used ps command options
Studying Linux commands and frustration
Device and Linux file system
[Python] Frequently used library code
Linux file and directory permissions
Frequently used subpackages of SciPy
Python frequently used code snippets
Basic commands for file operations