Basic Linux Command
1. ls [Option] [File]
Get information of file name and directory name
<Option>
-a : Output all files including hidden files started by dot(.)
-l : Output Long format
Get information of file name and directory name
<Option>
-a : Output all files including hidden files started by dot(.)
-l : Output Long format
-t : Sort files by last updated time
-r : Output with reverse order.
2. cp [option] [copy source] [copy destination]
Copy file or directory<Option>
-i : Confirmation message will be displayed at the time of file rewrite
-r : Copy directory and the files in the directory
-p : Hold information of original file, such as owner, permission, update time and so on.
Copy file or directory<Option>
-i : Confirmation message will be displayed at the time of file rewrite
-r : Copy directory and the files in the directory
-p : Hold information of original file, such as owner, permission, update time and so on.
3. mv [move resource file] [move destination file]
Move file or change file name<Option>
-i : Confirmation message will be displayed at the time of file rewrite
-f : Move file forcibly
4. rm [File name]
remove file or directory
<Option>
-i : Confirmation message will be displayed at the time of file remove
-r : Remove directory and the files in the directory
-f : Remove file forcibly
5. pwd
Display your current directory.
Display your current directory.
6. cd [directory name]
move directory
move directory
7. mkdir [Directory name]
Create new directory<Option>
-p : Create upper directory of the directory you designated.
8. cat [File name]
Print content of file
Print content of file
<Option>
-n : Print the file content with
-n : Print the file content with
9. sort [Option] [File name]
Sort content of the file.<Option>
-r : Sort in reverse order
-k n : Sort by n column data
-n : Sort by number10. uniq [File name]
Duplicate line of the file is omitted.
Sort content of the file.<Option>
-r : Sort in reverse order
-k n : Sort by n column data
-n : Sort by number10. uniq [File name]
Duplicate line of the file is omitted.
11. tr [String A] [String B]
Replace String in the file or standard output.
e.g) $ cat sample.txt | tr abc ABC
コメント