Both the less and more commands are similar in that they enable you to display the contents of a file and page through those contents if they extend beyond the screen. The less command typically has additional features that more doesn’t, but newer versions of more have added some of those features. While you’re free […]
Archives for October 2022
less: command not found
Both the less and more commands are similar in that they enable you to display the contents of a file and page through those contents if they extend beyond the screen. The less command typically has additional features that more doesn’t, but newer versions of more have added some of those features. While you’re free […]
tail: command not found
For the purpose of troubleshooting, one of the most useful commands you will use is known as tail. A command-line expression that can be used to read the last lines of a log file is as follows: # tail -n 100 /var/log/maillog Similarly, tail can also be used to obtain the most recently added lines […]
whereis: command not found
The whereis command is used to display various details associated with a command. For example, when entering whereis ls the following output is displayed:ls: /bin/ls /usr/share/man/man1/ls.1.gz /usr/ share/man/man1p/ls.1p.gz. Where /bin/ls indicates the location of the ls command and /usr/ share/man/man1/ls.1.gz /usr/share/man/man1p/ls.1p.gz indicates the location of the man pages for the ls command. Syntax The syntax […]
which: command not found
The which command displays the complete path of a specified command by searching the directories assigned to the PATH variable. For example, upon entering which cat, the following output is displayed: /bin/cat. $ which cat /bin/cat The which command can therefore help you locate where a program has been installed in case you need to […]
find: command not found
The find command enables you to search a specific location for files and directories that adhere to some search criteria. It recursively searches the directory structure, including any subdirectories and their contents, beginning with the search location you enter. You can perform one or more actions on the files found. The -type option enables you […]
updatedb: command not found
The updatedb command is used to build a database of files based on the /etc/updatedb.conf file. This command is used to update the /var/lib/mlocate/mlocate.db database. The /etc/updatedb.conf file consists of the paths that should be excluded while building the database. To add a path that needs to be excluded while building the database, open the […]
locate: command not found
Sometimes, you create a file and forget wherein the directory structure you put it. Sometimes you don’t know the exact location of files created by the system, applications, or other users. In Linux, you have several powerful tools for finding the files you’re looking for. The locate Command The locate command quickly searches for any […]
gedit: command not found
The gedit text editor is the default text editor used in GNOME desktop environments and is a member of the GNU Project. Unlike Vim and nano, gedit has a GUI with a typical menu-based design that makes it easy to work with. It also has features like syntax highlighting and spell checking and can be […]
vim: command not found
Vim, a contraction of Vi IMproved, is an extended version of the vi editor. Vim implements a text-based user interface to advanced text editing, and is favored by many system administrators and software engineers for its efficiency and ability to be extensively customized. Vim also includes useful features such as text completion, syntax highlighting, spell […]