Fun in the terminal: 6 interesting Linux Command Line tools, linux Command Line
Article link:
Http://hpw123.net/a/Linux/ruanjiananzhuang/2014/1103/117.html
More articles are availableHttp://www.hpw123.net
This article introduces some new interesting commands and single-line scripts, which will surely surprise you.
1. pv command
You may have seen simulated subtitles in a movie. They seem to have been knocked out in real time. Isn't it good if I can achieve this in a terminal?
This can be done. We can install the 'pv' command on the Linux system through 'apt 'or 'yum'. The installation command is as follows.
- # Yum install pv [on RedHat-based systems]
-
- # Sudo apt-get install pv [On Debian-based systems]
After the 'pv' command is successfully installed, run the following single-line command to view the real-time text output on the terminal.
- $ echo "Tecmint[dot]com is a community of Linux Nerds and Geeks" | pv -qL 10
Running pv command
Note: The 'q' option indicates 'quiet' and no other output information. The 'l' option indicates the maximum number of bytes converted per second. adjust the value of a number (which must be an integer) to display the text effect in another direction.
2. toilet command
How can I use the single-line script command 'toilet' to display the text for adding a border in the terminal? Similarly, you must ensure that the 'toilet' has been installed on your computer. if not, use apt or yum for installation. (Note: 'toilet' is not in the official ora repository. You can download the source code from github for installation)
- $ while true; do echo “$(date | toilet -f term -F border –Tecmint)”; sleep 1; done
Running toilet command
Note: The preceding script must be paused by pressing ctrl + z.
3. rig command
This command generates a random ID and address each time. to run this command, you need to install 'rig' with apt or yum '. (Note: 'rig' is not in the official Fedora repository. I only found the deb package of Ubuntu on rpmseek, which can be used for installation .)
- # rig
Running rig command
4. aview command
What do you think about displaying images in ASCII format on a terminal? We must use apt or yum to install the package 'aview '. (Note: 'avieww 'is not in the official ora repository. You can download the source code from the aview project homepage for installation .) there is an image named 'elephant.jpg 'in the current working directory. I want to view it on the terminal in ASCII mode.
- $ asciiview elephant.jpg -driver curses
Running aview command
5. xeyes command
In the previous article, we introduced the 'oneko 'command, which can display a mouse that follows the movement of the mouse pointer. 'xyyes 'is a similar graphics program. When you run it, you can see two eyes of the little monster following your mouse movement.
- $ xeyes
Running xeyes command
6. cowsay command
Do you still remember the command we introduced last time? It can display a piece of pre-determined text and a character consisting of a cow. What if you want to use another animal to replace the cow? View the list of available animals:
- $ cowsay -l
How can we use ASCII to describe snakes?
- $ cowsay -f elephant-in-snake Tecmint is Best
Running cowsay command
What if I change to a goat?
- $ cowsay -f gnu Tecmint is Best
Running goat cowsay command
An interesting Linux exercise
Reminder one hour later:
Use w to check the current terminal, for example, pts/0, because it is running in the background. If no terminal is specified, linux does not know where the echo content is output, the same is true with crontab.
At now + 60 minutesat> echo "Time for Lunch !! ">/Dev/pts/0at> <EOT> PS: The above at> is a prompt, not the command content. Finally, <EOT> indicates entering CTRL + D.
Cmd command, linux Command
XP. CMD command Overview
For more information about a command, enter the HELP command name.
ASSOC displays or modifies file extension associations.
AT is the command and program to be run on the computer.
ATTRIB displays or changes file attributes.
Set or clear the extended CTRL + C check.
CACLS displays or modifies the File Access Control List (ACLs ).
CALL calls this one from another batch processing program.
CD displays or changes the name of the current directory.
CHCP displays or sets the number of pages of the active code.
CHDIR displays or changes the name of the current directory.
CHKDSK checks the disk and displays the status report.
CHKNTFS Displays or modifies the boot time disk check.
CLS clears the screen.
CMD opens another Windows Command Interpreter window.
COLOR sets the default console foreground and background COLOR.
COMP compares the content of two or two sets of files.
COMPACT Displays or changes the compression of files on NTFS partitions.
CONVERT Converts a FAT volume to NTFS. You cannot convert
Current Drive.
COPY Copies at least one file to another location.
DATE: displays or sets the DATE.
DEL deletes at least one file.
DIR Displays files and subdirectories in a directory.
DISKCOMP compares two floppy disks.
DISKCOPY copies the content of one floppy disk to another.
DOSKEY: edit the command line, call the Windows Command, and create a macro.
ECHO Displays the message, or explicitly opens or closes the command.
ENDLOCAL ends the localization of Environment Changes in the batch file.
ERASE deletes at least one file.
EXIT to EXIT the CMD. EXE program (command interpreter ).
FC compares two or two sets of files and displays
Different Places.
FIND searches for text strings in the file.
FINDSTR searches for strings in the file.
FOR runs a specified command FOR each file in a set of files.
FORMAT the disk for use with Windows.
FTYPE Displays or modifies the file type associated with the file extension.
GOTO direct the Windows command interpreter to a batch processing program
Is specified.
GRAFTABL enables Windows to display images
Extended character set.
HELP provides HELP information for Windows commands.
IF executes conditional processing in the batch processing program.
LABEL to create, change, or delete the volume LABEL of a disk.
MD creates a directory.
Create a directory using MKDIR.
MODE: configure the system device.
MORE: display a result screen at a time.
MOVE Moves the file from one directory to another.
PATH: displays or sets the search PATH for executable files.
PAUSE Suspends processing of batch files and displays messages.
POPD restores the previous value of the current directory saved by PUSHD.
PRINT a text file.
PROMPT to change the Windows command PROMPT.
PUSHD saves the current directory and changes it.
RD deletes the directory.
RECOVER restores readable information from the faulty disk.
REM record comments in a batch file or CONFIG. SYS.
Rename the file.
RENAME the file.
REPLACE the file.
Delete the RMDIR directory.
SET displays, sets, or deletes Windows environment variables.
SETLOCAL starts localization of Environment Changes in the batch file.
SHIFT changes the positions of parameters that can be replaced in a batch file.
SORT classifies input.
START starts another window to run the specified program or command.
SUBST Associates the path with a drive letter.
TIME: displays or sets the system TIME.
TITLE: Set the TITLE of the CMD. EXE session.
TREE displays the directory structure of the drive or path in graphic mode.
TYPE: displays the content of a text file.
Server displays the Windows version.
VERIFY tells ...... the remaining full text>