Ubuntu – the difference between “more” and “less” commands
command linelessmore
What is the difference between the two commands below?
more file-name
less file-name
Best Answer
more is the oldest, less is an improvement and most is an improvement on that.
Short comparison:
more: forward navigation and limited backward navigation.
less: both forward and backward navigation and also has search options. You can go to the beginning and the end of a file instantly. Plus you can switch to an editor (like open the file in vi or vim). It is noticeably quicker than editor for when the file is large.
most: has all the features of more and less but you can also open multiple files, close 1 file at a time when you have multiple files open, allows locking and scrolling of the open windows and allows for splitting of open windows.
All 3 use the h to let you view the keybindings for the command.
dir and ls are part of coreutils and dir is almost the same as ls, just with different default options.
The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system.
info dir says:
dir is equivalent to ls -C -b; that is, by default files are listed
in columns, sorted vertically, and special characters are represented
by backslash escape sequences.
Oh and there is also vdir! info vdir says:
vdir is equivalent to ls -l -b; that is, by default files are
listed in long format and special characters are represented by
backslash escape sequences.
Most likely dir exists for backwards compatibility or due to historical reasons.
apt-get and install are obligatory. The -f is optional and can be placed anywhere after apt-get. Though the man page has them explained as apt-get -f install:
Best Answer
more
is the oldest,less
is an improvement andmost
is an improvement on that.Short comparison:
more
: forward navigation and limited backward navigation.less
: both forward and backward navigation and also has search options. You can go to the beginning and the end of a file instantly. Plus you can switch to an editor (like open the file in vi or vim). It is noticeably quicker than editor for when the file is large.most
: has all the features ofmore
andless
but you can also open multiple files, close 1 file at a time when you have multiple files open, allows locking and scrolling of the open windows and allows for splitting of open windows.All 3 use the
h
to let you view the keybindings for the command.