A Linux command that displays the full path of the current working directory location. "pwd" stands for "print working directory".
/home/hoge/test_link
$ pwd -L
/home/hoge/test_link
A Linux command that creates a new directory. "mkdir" is an abbreviation for "make directory".
/home/hoge
$ ls -a
hoge.txt .hidden
$ mkdir -m 666 test
$ ls- a
hoge.txt .hidden test
Linux command to move directories. "cd" is an abbreviation for "change directory".
/home/hoge/test
$ cd ../test2
This command outputs the file contents as standard. "cat" is an abbreviation for "concatenate".
/home/hoge/test
$ cat -n test.txt
1 hoge
2 hogehoge
3
4 hogehogehoge
5
6
7
8 hogehogehogehoge
9
Linux commands used to copy files and directories. "cp" is an abbreviation for "copy".
/home/hoge
$ cp -r test /home/hoge/test2
This command is for displaying file and directory information. "ls" stands for "list directory contents".
/home/hoge
$ ls -lh
-rw-r--r-- 1 root root 11B Feb 24 17:11 hoge.txt
drwxr-xr-x 2 root root 4.0K Feb 24 17:14 test
drwxr-xr-x 2 root root 4.0K Feb 24 17:15 test2
Linux command to change the time stamp. It also has a function to create a new file by specifying a file name that does not exist.
/home/hoge
$ ls -lh
-rw-r--r-- 1 root root 11B Feb 24 17:11 hoge.txt
drwxr-xr-x 2 root root 4.0K Feb 24 17:14 test
drwxr-xr-x 2 root root 4.0K Feb 24 17:15 test2
$ touch -d "2020-2-25 18:30" hoge.txt
$ ls -lh
-rw-r--r-- 1 root root 11B Feb 24 18:30 hoge.txt
drwxr-xr-x 2 root root 4.0K Feb 24 17:14 test
drwxr-xr-x 2 root root 4.0K Feb 24 17:15 test2
This is a Linux command to check the contents of the file.
/home/hoge
$ less -X hoge.txt
hogehoge
$
A command for moving files and directories. "mv" is an abbreviation for "move".
/home/hoge/test
$ mv -v test.txt ex.txt test.log test2
`test.txt' -> `test2/test.txt'
`ex.txt' -> `test2/ex.txt'
`test.log' -> `test2/test.log'
Linux command to delete files and directories. "rm" is an abbreviation for "remove".
/home/hoge
$ rm -i hoge.txt
remove hoge.txt? (y or n) y
A Linux command for logging in to a remote host or executing a command using the ssh protocol. "ssh" is an abbreviation for "secure shell".
#IP192 as root user.168.x.Connect to x
$ ssh -l root 192.168.x.x
This is a Linux command for checking the manual of each command. "man" is an abbreviation for "manual".
#View the cd command manual using cat
$ man -P cat cd
BUILTIN(1) BSD General Commands Manual BUILTIN(1)
NAME
builtin, !, %, ., :, @, {, }, alias, alloc, ...
Command External csh(1) sh(1)
! No No Yes
% No Yes No
. No No Yes
: No Yes Yes
@ No Yes Yes...
AUTHORS
This manual page was written by Sheldon Hearn <[email protected]>.
BSD February 23, 2005 BSD
We undertake various development and construction contracts and mentor work for beginners. If you are interested, please go to ** here **
Recommended Posts