Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Command used to show the content stored inside a file in linux

The less command is one I use a lot. It shows you the content stored
inside a file, in a nice and interactive UI.
Usage:



$ less <filename>



Once you are inside a less session, you can quit by pressing q
You can navigate the file contents using the up and down keys, or using space bar 
and b to navigate page by page. You can also jump to the end of the file pressing G
and jump back to the start pressing g

You can search contents inside the file by pressing / and typing a word to
search. This searches forward. You can search backwards using the
symbol and typing a word ? 
This command just visualises the file's content. You can directly open an
editor by pressing v
It will use the system editor, which in most cases is
vim .

Pressing the F key enters follow mode, or watch mode. When the file is
changed by someone else, like from another program, you get to see the
changes live. By default this is not happening, and you only see the file
version at the time you opened it. You need to press ctrl-C to quit this mode.

You can open multiple files, and navigate through them using :n (to go to the next file) 
and :p (to go to the previous).
Comment

PREVIOUS NEXT
Code Example
Shell :: Heroku bash vim 
Shell :: ibus ubuntu 22.04 
Shell :: how to install ConfigServer Mail Manage in whm? 
Shell :: locate path software 
Shell :: conflict: unable to remove repository reference sail 
Shell :: bash count occurrences of character in string 
Shell :: scp linix folder 
Shell :: redirect batch file output 
Shell :: Connect to a Windows Maching via RDP 
Shell :: ros galactic 
Shell :: i2c-tools, i2c 
Shell :: chown a symlink 
Shell :: Show All In Current Folder 
Shell :: compile 
Shell :: modify read only file 
Shell :: Bulk user add with passwords bash script 
Shell :: youtube-dl show formats 
Shell :: sanity coding with basir 
Shell :: what is -e flag for in bash sed? 
Shell :: mnet - git config user 
Shell :: jq select where value starts with 
Shell :: install arch.univariate import arch_model 
Shell :: installing auto complete oh-my-posh PS 
Shell :: install smui top-app-bar 
Shell :: wsl2 cargo 
Shell :: set environmental variables for one command powershell 
Shell :: git merge anotehr 
Shell :: ring packages 
Shell :: maven archetype magnilia 
Shell :: linux check speed of file growth 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =