🖥️fmt
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the fmt command with important options and switches using examples.
2 minute read
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
███████╗███╗ ███╗████████╗
██╔════╝████╗ ████║╚══██╔══╝
█████╗ ██╔████╔██║ ██║
██╔══╝ ██║╚██╔╝██║ ██║
██║ ██║ ╚═╝ ██║ ██║
╚═╝ ╚═╝ ╚═╝ ╚═╝
# fmt is a simple optimal text formatter. It reformats each paragraph in the file passed to it, and writes the file contents to standard output.
fmt file1
# fmt Command
#-------------------------------------------------///
# fmt simple optimal text formatter, it reformats paragraphs in specified file and prints results to the standard output. The following is the content extracted from the file domain-list.txt:
1.tecmint.com 2.news.tecmint.com 3.linuxsay.com 4.windowsmint.com
# To reformat the above content to a standard list, run the following command with -w switch is used to define the maximum line width:
cat domain-list.txt
1.tecmint.com 2.news.tecmint.com 3.linuxsay.com 4.windowsmint.com
fmt -w 1 domain-list.txt
1.tecmint.com
2.news.tecmint.com
3.linuxsay.com
4.windowsmint.com
# Format text with long lines to text with fixed width
fmt -s -w80 file.txt
# Explanation:
# It will break lines longer than 80 characters at appropriate white spaces to make them less than 80 characters long.
# The -s flag will collapse multiple consecutive white spaces into one, or at the end of a sentence a double space.
#==============================##==============================#
# CMD FMT #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command fmt in a clear format. This allows users to quickly access the needed information for fmt without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for fmt are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.