Learning memorandum for me w

Command memorandum (study for Linux level 1 exam)

A file compressed in gzip format hoge.txt → hoge.txt.gz is completed.

gzip compression command options

-d When opening a compressed file → gunzip You can still open the compressed file.

-c Output to standard output, leaving the original file -r Recursively compress all files in the directory

Compression rate

xz> bzip > gzip

cpio command options

It seems to mean copy-in and out with cpio. Used for standard input and output. Use the find or ls command to retrieve the list of files and use the pipe to output the cpio command. By the way, in the option

-o Create a new archive -i Extract files from archive

XZ This is when compressing files in xz format! (High compression rate) Option -d When opening a compressed file (this is with gzip) It can also be expanded with the unzx command. -k Do not delete compressed files from original files -l Display compressed file information.

ls command

This command to display files and directories There are too many options

-a Show all files, including hidden files -A Same as above -d Display information for the specified directory -i inode Display with number -l Users, permissions, etc. that add detailed information -R Recursively display the contents of subdirectories -F Shows the file type behind (Normal file: None, /: Directory, *: Executable file)

tar command

tar is used when decompressing multiple files into one file. There are many options. -c Create a new archive -x Extract files from archive -t List archive contents -f Specify archive file name -v Show detailed processing information -z Compress and decompress through gzip -j Compress and decompress through bzip -Compress and decompress through J xz

touch Creates files from, and creates time stamps for files. Time stamp = access time and correction time -t time Change the access time and correction time to the specified time -a Change access time -m Change modification time

When copying from a file to a device

Use the dd command. if = input file Specify the input file (device) of = output file Specify the output file (device)

mv Rename or move files or directories

cp command

-f Forcibly overwrite any file or directory with the same name. -i Ask if you want to overwrite -p Copy while preserving file attributes (user, update time, permissions) -r, R Copy directory

Command to update the time stamp file

echo original> original This will redirect the original file and update the timestamp. ls -l> This is also redirect, so time stamp update touch updates the time stamp of the file. In the first place, a time stamp indicates the date, time, and time when an event occurred. Is it the time when the file was updated?

vi command

l 1 character to the right h 1 character to the left The keyboard is also arranged in the same way j 1 character down k 1 character up

: 5 = 5G Same meaning Go to the 5th line. : set nonu =: set nonumber Do not add the number of lines : set number: set nu Add line number

a Input from the right with the cursor i Input from the left with the cursor I Enter from the beginning of the line where the cursor is A Input from the butt with the cursor o Insert a blank line below the line where the cursor is, and insert from that line O Create a blank line on the line above the cursor and insert from that line!

? ~ Search upward from the cursor position / ~ Search downward from the cursor position : e! To close the currently open file and bring out a new file without exiting vi. !! There is, so it will save it. !! If there isn't, just close it. The: e system is an image of opening the current file and releasing a new one ~

スクリーンショット 2020-06-13 11.45.31.png

Bring to the bottom of the L screen $ To the end of the line H To the top of the screen : q Quit vi, but cannot quit with a warning when the content has changed. 0 Bring the cursor to the beginning of the line Specify the width of tab numerically with: set ts = 10 and: tabstop = 10.

: r Use: r to read and insert the contents of the specified file after the current line

:! Command Use this command to execute Linux commands without exiting the vi editor. /When? Is the command to use when searching (/ searches toward the bottom of the file, while? Searches toward the head (reverse)). n Proceed toward the buttocks N Recommended toward the head

: q! Exit the editor without saving : q Quit vi, but cannot quit because a warning will be displayed if the edited contents have been changed. : w I want to save the file I'm editing without quitting! Save your edits and exit: wq! =: X = ZZ

yy and Y Copy the line at the cursor position yw Copy the word at the cursor position to the buffer dd Delete the line at the cursor position and copy it to the buffer dw Delete the word at the cursor position and copy it to the buffer p Insert the contents of the buffer (to the right of the character or word cursor, to the bottom of the line) Insert the contents of the P buffer (letter or word to the left of the cursor, line up)

X Delete the character to the left of the cursor position and copy it to the buffer x Delete the character at the cursor position and copy it to the buffer

Processes and jobs

スクリーンショット 2020-06-15 16.44.05.png

This is too easy to understand www

bg [Job number] Command that returns to the background where it is paused When returning from the fg background to the foreground, when returning from the paused state to the foreground Ctrl + Z Pause Ctrl + C forced termination pgrep You can search for a process ID with a specific name from the running process.

STOP and TSTP are signals that suspend the process. The signal numbers are 19 and 20, respectively. -f Show process in full format

Recommended Posts

Learning memorandum for me w
Deep Learning Memorandum
Memorandum for me ③ Basic file editing using vi
Reinforcement learning for tic-tac-toe
Summary for learning RAPIDS
Freecad memorandum (for myself)
Effective Python Learning Memorandum Day 15 [15/100]
Data set for machine learning
[Learning memorandum] Introduction to vim
Japanese preprocessing for machine learning
Learning flow for Python beginners
Effective Python Learning Memorandum Day 6 [6/100]
Python learning plan for AI learning
Effective Python Learning Memorandum Day 9 [9/100]
Effective Python Learning Memorandum Day 8 [8/100]
Deep learning for compound formation?
Effective Python Learning Memorandum Day 14 [14/100]
Effective Python Learning Memorandum Day 1 [1/100]
Effective Python Learning Memorandum Day 13 [13/100]
Effective Python Learning Memorandum Day 3 [3/100]
Effective Python Learning Memorandum Day 5 [5/100]
Checkio's recommendation for learning Python
Effective Python Learning Memorandum Day 4 [4/100]
Linux command memorandum [for beginners]
Effective Python Learning Memorandum Day 7 [7/100]
Effective Python Learning Memorandum Day 2 [2/100]
[PyTorch] TRANSFER LEARNING FOR COMPUTER VISION
TF2RL: Reinforcement learning library for TensorFlow2.x
Web teaching materials for learning Python
For me: Infrastructure and network notes
Learning method output for LPIC acquisition
Chainer Machine Learning Introductory Tutorial Memorandum
Notes for me python csv graph
<For beginners> python library <For machine learning>
Machine learning meeting information for HRTech
[Recommended tagging for machine learning # 4] Machine learning script ...?
[AI] Deep Learning for Image Denoising