Clear command help & alias


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Clear command help & alias
# 1  
Old 05-22-2012
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.

Code:
alias l='ls -lh'

All helps appreciated.
# 2  
Old 05-22-2012
with regards to the shortcuts are you setting these up in your .profile? if not and you are setting these at the command line, then they will disappear when you log off. you have to set them up in your .profile (or .bash_profile) (not big on Mac Unix). As for the clear solution not really sure on that, but did you try
Code:
tput clear

?
This User Gave Thanks to dagamier For This Post:
# 3  
Old 05-22-2012
when I try
Code:
tput clear

it does exactly the same as clear command.

But, when I say just the clear command, it prints the same program's help menu. SmilieSmilieSmilie
# 4  
Old 05-22-2012
check your aliases.

Code:
tput clear

is a system command. you might need to redefine the alias or at least check to see what it is set to. you might want to do a
Code:
man tput

so you can get an idea of what it can do for you
This User Gave Thanks to dagamier For This Post:
# 5  
Old 05-23-2012
What's the output of

Code:
type clear

on your system?

And if clear is an alias for something, you may use
Code:
\clear

to escape the usage of that alias...

Last edited by elixir_sinari; 05-23-2012 at 09:52 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Alias ip & hostname

Hello Forum members, I am new to the Linux administration and i have a question on the below requirement , requirement is as below Create a new alias-IP & alias-Host name to the existing virtual machine ( RHEL 6.6) I have created alias-IP and here is the below eth3 Link... (0 Replies)
Discussion started by: raokl
0 Replies

2. 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

3. UNIX for Dummies Questions & Answers

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... (5 Replies)
Discussion started by: Ben31400
5 Replies

4. 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

5. 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

6. 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

7. UNIX for Dummies Questions & Answers

alias for running in background &

Hi all, I am kinda new to this unix environment, and now I get confused to figure out this alias problem. I would like to make my xemacs to run in background every call, and I am trying to do it this way in .bashrc alias e='xemacs &* & ' i also tried e () { xemacs "&*" &} but they are... (0 Replies)
Discussion started by: hfireflyu
0 Replies

8. 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

9. HP-UX

alias & parameters

We just recently moved from a DG-UX (Unix V) to HP 9000 servers running POSIX. I used the c-shell in the DG-UX system mainly because the bourne-shell did not support aliasing. Now in the default posix-shell of HP aliasing is supported. The main difference seams to be that in a c-shell you can pass... (1 Reply)
Discussion started by: vslewis
1 Replies

10. Shell Programming and Scripting

Alias's & Functions - simple question

Having a memory lapse: If I redefine a command using an alias or a function - How do I access the "real" command without specifying an absoulte path: i.e. function man { /usr/bin/man |more } alias ls='/usr/bin/ls -l' How do I specify the ls or man command above without the... (6 Replies)
Discussion started by: kornshellmaven
6 Replies
Login or Register to Ask a Question