Server Candy; Never type ls -al again

If you have a program or script that you'd like to give away or sell, this is the place to do it. All offers should include contact info.

Moderators: BBear, theunknownhost, flaguy

Post Reply
User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Server Candy; Never type ls -al again

Post by Arf » Wed Nov 20, 2002 3:32 pm

Okay, raise your hand, how many of you really like the to see all the information that # ls -al provides (in my case I like to use "ls -al -B --color=tty'") . I do. I hate trying to figure out the columns of file names that just "ls" provides. So why not make a command that allows you to have this without having to think about what extra items to add to the command line.

Here is where "Aliases" come in handy. These allow you to assign shortcuts to hard to remember commands. I use "dir" (reconning back to my old DOS days).

To create an aliase, you edit your /home/$user/.bashrc file and then relogin. Try simply adding the line below to yours and you'll see how easy this is.

alias dir='/bin/ls -al -B --color=tty'

Now when you relogin and type "dir", you'll see that your programs are bold faces as well as all the other information on each file is provided.

(This will work on most all Linux servers, not just Alabanza)

rliggieri
Alahosts.com-Newbie
Posts: 8
Joined: Mon Aug 04, 2003 9:05 pm

root?

Post by rliggieri » Mon Aug 04, 2003 10:37 pm

Hello Arf,
Can this be setup for root?

User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Post by Arf » Tue Aug 05, 2003 2:34 am

It can yes. That's exactly how I use it.

also, welcome to the party rliggieri.

rliggieri
Alahosts.com-Newbie
Posts: 8
Joined: Mon Aug 04, 2003 9:05 pm

Thanks

Post by rliggieri » Tue Aug 05, 2003 2:36 am

Thanks Arf,
I placed an order for several of your scripts today.

User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Post by Arf » Wed Aug 06, 2003 2:34 pm

I'm glad this helped. Sometimes it's the most simple things that make life go a little smoother.

naplesdave
Nothing better to do.
Posts: 243
Joined: Mon Apr 14, 2003 6:18 pm
Location: Naples, FL
Contact:

Post by naplesdave » Tue Nov 18, 2003 11:38 pm

I guess you could name it anything, (other than dir) since dir is a Linux command as well.
Kind regards,
Dave Jackson
World Wide Mart, Inc.

User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Post by Arf » Wed Nov 19, 2003 5:59 am

Yes, but I wanted the 'dir' command to look more like DOS. Personal preference.

naplesdave
Nothing better to do.
Posts: 243
Joined: Mon Apr 14, 2003 6:18 pm
Location: Naples, FL
Contact:

Post by naplesdave » Wed Nov 19, 2003 12:32 pm

And it doesn't matter, I suppose, cause the Linux dir is a directory listing as well.

I learned the alias command a few years ago from Matt Wright who uses Pine to check his e-mail on the server. He would alias pine to pine -i which would take him right to the inbox. Later, I saw he had a bunch of these shortcuts created. Pretty useful when you do as much typing as he does.
Kind regards,
Dave Jackson
World Wide Mart, Inc.

User avatar
crashdump
Hard Drive Crasher
Posts: 950
Joined: Thu Oct 17, 2002 5:44 pm
Location: Virginia

Post by crashdump » Wed Nov 19, 2003 1:05 pm

speaking of pine (sorry to get off topic), but does anyone know how to configure pine to use another account as the sending email address instead of the account you are currently logged in with?

Meaning if I'm logged in as user1, and I invoke pine, how can I send an email so it sends out as support @ hostspring.com instead of user1 @ hostspring.com???

seems like an obvious option to configure...but I can't find it :o

thanks
Last edited by crashdump on Wed Oct 06, 2004 9:55 pm, edited 1 time in total.

naplesdave
Nothing better to do.
Posts: 243
Joined: Mon Apr 14, 2003 6:18 pm
Location: Naples, FL
Contact:

Post by naplesdave » Wed Nov 19, 2003 3:50 pm

It's under Setup | Configure. The setting is User-Domain.

OPTION: User-Domain

This value specifies the domain part (right-hand side) of your return address on outgoing email and is also used as
the default domain for email composed to a local user. If unset, Unix Pine will obtain the domain from the system.
Often this value will be set for your whole site by the system administrator.

If you set this, see also the "quell-user-lookup-in-passwd-file" feature.

Hope this helps.
Kind regards,
Dave Jackson
World Wide Mart, Inc.

User avatar
crashdump
Hard Drive Crasher
Posts: 950
Joined: Thu Oct 17, 2002 5:44 pm
Location: Virginia

Post by crashdump » Wed Nov 19, 2003 8:45 pm

Dave,

I do have that configured...but how do I alter the left-hand side of the email address to be different then the Unix username using pine??

thanks
Last edited by crashdump on Wed Oct 06, 2004 9:54 pm, edited 1 time in total.

naplesdave
Nothing better to do.
Posts: 243
Joined: Mon Apr 14, 2003 6:18 pm
Location: Naples, FL
Contact:

Post by naplesdave » Wed Nov 19, 2003 9:06 pm

Change "personal-name" on the same screen (first setting).

OPTION: Personal-Name

This value is used to determine the full name part of the "From" address on messages you send. If unset, Unix Pine
will obtain your full name from the system password file. PC-Pine, on the other hand, requires that this be set.
Kind regards,
Dave Jackson
World Wide Mart, Inc.

User avatar
crashdump
Hard Drive Crasher
Posts: 950
Joined: Thu Oct 17, 2002 5:44 pm
Location: Virginia

Post by crashdump » Thu Nov 20, 2003 6:33 pm

Dave,

changing 'personal name' isn't the option i'm looking for. given the following email address, how can I change 'user1' to 'user2' if I'm logged in with user1 while using pine:

user1@domain.com

thanks for your help
Last edited by crashdump on Wed Oct 06, 2004 9:54 pm, edited 1 time in total.

naplesdave
Nothing better to do.
Posts: 243
Joined: Mon Apr 14, 2003 6:18 pm
Location: Naples, FL
Contact:

Post by naplesdave » Thu Nov 20, 2003 7:23 pm

Yeah, I know what you're trying to do, now. It can be done, I'm pretty sure, in version 4 and above, but I'm not sure what setting to change. I'll investigate.
Kind regards,
Dave Jackson
World Wide Mart, Inc.

Caygill
Nothing better to do.
Posts: 133
Joined: Tue May 10, 2005 3:20 pm

Post by Caygill » Fri Mar 10, 2006 10:51 am

Thanks arf, the second of your tips already implemented today :)

User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Post by Arf » Fri Mar 10, 2006 11:04 pm

No problem Caybill. And welcome to Alahosts! Always nice to see a new face around here. Our old crusty faces are getting, well, old and crusty.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest