Unix : About options of clear command ?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unix : About options of clear command ?
# 1  
Old 02-25-2011
Question Unix : About options of clear command ?

Hello everyone,

My question is quite simple, even if I didn't find an answer. I would want a command (maybe clear with some options ?) that can do the following : clear completely the console, as it is when we start a console for the first time.

My problem is that I sometimes display a lot of informations on the console (such as elements of matrices), and if I do this operation two times, it's hard to see distinctly where starts the information of the second computation.

Thanks to all the ones who will help me.
# 2  
Old 02-25-2011
I sometimes have the same issue - this is an alias that helps me to see the new output
clearly
Code:
cls="clear && banner '----' "

This creates a custom command -- cls
# 3  
Old 03-03-2011
About a modified version of CLEAR

Thanks for your answer that is helpful.

Nevertheless, do you know if it is possible to completely clear the screen ?
# 4  
Old 03-03-2011
Sounds like you want to reset the terminal
Code:
tput reset

# 5  
Old 03-03-2011
Unfortunately, this is not what I want. When I use
Code:
tput reset

I can use in the console the vertical scrollbar to access the previous informations displayed on the console. What I want, is a command that make the console absolutely empty of previous displays (without being forced to start a new console each time).
# 6  
Old 03-03-2011
I don't know of any 'harder' reset command for terminals that don't clear their scrollback on a terminal reset. Remember where these things came from -- hardware terminals that had no scrollback; the scrollback buffer is an extension not controlled by the terminal session. There might be an option in your terminal emulator itself.

If you have no better option you can blow away the buffer with
Code:
dd if=/dev/zero count=16 2> /dev/null | tr '\0' '\n' ; reset

...to print 16*512 newlines then clear the screen.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX find command - using multiple -name options

Hi all, What am trying do is search for a directory that is owned by cm that only exists in a path that has a particular directory ex: what I'm using now is find . -user cm -name '*.rel' -type d -exec ls -dl {} \; This is giving me stuff like this ./../../foo1/../../*.rel... (2 Replies)
Discussion started by: jtmed
2 Replies

2. Shell Programming and Scripting

Clear command help & alias

Hi Folks, When I type clear on my unix prompt on mac terminal, it prints the help menu of a program instead of cleaning the contents of the screen. Also, I have used the following alias command to setup some shortcuts, but soon after I logout and login, these shortcuts doesn't work. alias... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

3. Shell Programming and Scripting

clear command issue

I need to clear the screen after each iteration but i cannot place clear where it needs to go to do that. I just keep clearing the screen before i can even see the choice I make. HWfile=~/home/daftdave/HW2 loop=y while do tput cup 2 15 ; echo "File Menu List" ... (1 Reply)
Discussion started by: noob
1 Replies

4. Shell Programming and Scripting

Command to clear logs for every 6 hours in solaris

Hi Folks, I need to remove log files for six hours on Solaris. before i used to do for every 24 hours below is the code for 1 day older log files, now i tried using -mmin +360 but it says command not found. Can someone please help me out!!! part of the code: LOG_FILE=`find /home/Logdir... (1 Reply)
Discussion started by: Sendhil.Kumaran
1 Replies

5. Solaris

how to clear command history

hi Any one can help me. I am using Sun_Solaris. The command history set to 100 at .cshrc. I am unable to clear the command histoy. In Linux it is very easy by giving command history -c I could not find any such type command to clear the history. Is there any such type of command for solaris.... (3 Replies)
Discussion started by: prabir
3 Replies

6. UNIX for Dummies Questions & Answers

command not clear

hi, i have an unix command which is as follows: ctmfw /work/CDFC/landing/ZORC.txt CREATE 0 60 1 10 240 I think a txt file called ZORC gets created in the mentioned directory, i am not sure what 0 60 1 10 240 is. Is my understanding correct and also let me know what those numbers denote?... (4 Replies)
Discussion started by: eljcmscrlk
4 Replies

7. UNIX for Dummies Questions & Answers

What command do you use to clear the print que?

Hi, I have a user that has tried to print a job several times and has now filled up the que. How do i delete all the jobs in the que and what is the command?:confused: (1 Reply)
Discussion started by: nov_user
1 Replies

8. UNIX for Dummies Questions & Answers

Clear Case views on UNIX

Friends, I was asked to work on Clear Case after setting up. For this created a dynamic view by using the command, 'cleartool mkview -tag <view name> -stgloc viewstg'. Now I am not sure how to proceed further :-( May I request you to help me out in continuing further. I have a deadline in... (1 Reply)
Discussion started by: mmohan
1 Replies

9. UNIX for Dummies Questions & Answers

Problem with clear command

Hi All I'm currently writing a very simple UNIX script to process some work. The very first thing I do on my script is use the "clear" command. how my file looks... clear echo "Return status: $?" For some strange reason, the return status being returned is 1, not 0 as i expected. ... (2 Replies)
Discussion started by: djkane
2 Replies

10. UNIX Desktop Questions & Answers

Clear logs in unix sco 5.0.4

hi my name es juan i have sco open server 5.0.4 release i need clear the log files as wtmp thanks you very much (1 Reply)
Discussion started by: jtapia
1 Replies
Login or Register to Ask a Question