LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2012, 10:39 PM   #1
Arcosanti
Member
 
Registered: Apr 2004
Location: Mesa, AZ USA
Distribution: Slackware 14.1 kernel 4.1.13 gcc 4.8.2
Posts: 245

Rep: Reputation: 22
Why no cls or some other clear screen command for the shell?


I have always wondered why there is no cls or a similar clear screen command available for the shell in Linux, liker there is in DOS.
 
Old 08-20-2012, 10:43 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

have you tried, "reset" or "clear"?

Evo2.
 
Old 08-20-2012, 10:43 PM   #3
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
There is, it is called "clear"
 
Old 08-20-2012, 11:46 PM   #4
Arcosanti
Member
 
Registered: Apr 2004
Location: Mesa, AZ USA
Distribution: Slackware 14.1 kernel 4.1.13 gcc 4.8.2
Posts: 245

Original Poster
Rep: Reputation: 22
Thanks for that info. I tried both and they worked. I think I'll make a symlink called cls and point it at clear since it is faster.
 
Old 08-21-2012, 12:10 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
You don't need a symlink, just set up an alias. Why go for three characters anyway? Just set an alias so that c=clear.
 
Old 08-21-2012, 12:12 AM   #6
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Jessie
Posts: 592

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by Arcosanti View Post
Thanks for that info. I tried both and they worked. I think I'll make a symlink called cls and point it at clear since it is faster.
Note that while both will clear the terminal screen, they are indeed two very different commands.

reset initializes the terminal, part of which is to clear the screen.
clear simply clears the terminal screen.

If you simply want to clear the screen, use clear. If your screen becomes garbled and chars are not displayed properly, then use the reset command.

See the manpages of both commands for more info.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeps typing CLS instead of clear? Well here is your fix... Master_CAPS Linux - Newbie 36 03-22-2012 10:26 AM
Clear Screen Command for BASH Shell erora Linux - Newbie 3 01-21-2010 10:03 PM
cls command esmaili.fateme Linux - Newbie 2 04-16-2009 02:37 AM
Problem with clear screen command unni krishnan Linux - Software 1 02-28-2008 04:31 AM
how do i replace the clear "clear screen" with the cls command thefedexguy SUSE / openSUSE 2 12-02-2005 06:02 PM


All times are GMT -5. The time now is 04:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration