Commands-1
MAN#
This command can view different sections of the manual pages.
Section#
Games#
fortune
can randomly display quotes and jokes.
Can be combined with cowsay
and lolcat
to play.
PWD#
Print Working Directory.
CAT#
Line No. With Blank Lines#
Line No. Without Blank#
File Details#
- File type:
d
directory, -
file, l
link, c
character device, b
block device. - File permissions: 700, Owner: 7, Group: 0, Other: 0
- Hard link count: 9
- File owner: root
- File group: root
- File size: 4.0K
- Modification time: Aug 7 22:38
- File name: root
- Major device number: 5/252, identifies the device driver
- Minor device number: 0, identifies a specific device instance within the same class of devices
Only Dirs#
Including hidden files
Specify Dir#
Type Symbols#
/
: directory*
: executable file@
: symbolic link|
: named pipe=
: socket
Hidden Characters#
There are hidden characters \n
in the output of the ls
command.
You can also use cat -A
.
FILE#
Show file type
Character/Block Device#
Link File#
Note the trailing slash.
LESS#
The more
command can only load by pressing Enter, the less
command is more powerful because less is more.
USERMOD#
Disable Account Login#
This command will change bin/sh
to /sbin/nologin
in /etc/passwd
Grant User Group#
The following command will grant the kuga user the sudo user group.
Soft Link#
go rocks
Specify File System Type#
ext4
is the file system type of Linux, apfs
is the file system type of macOS.
Disk Usage
Total Size of Dir#
Sort Files - Including Subdirs#
Sort Files - Excluding Subdirs#