LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-14-2010, 05:01 AM   #1
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Rep: Reputation: 35
Question Aliases with Busybox?


Hello

On a small Linux appliance using Busybox to provide the usual suspects, I'd like to create an alias "ll" that would translate to "ls -al" like I'm used to.

Apparently, "alias" is not part of Busybox:

Code:
> echo $SHELL
/bin/sh

> ls -al /sbin/sh*
lrwxrwxrwx    1 1000     1000            7 Jan  1  2007 /sbin/sh -> busybox

> alias ll='ls -al'
alias: not found
Does someone know of a trick to get Busybox to handle aliases?

Thank you.
 
Old 12-14-2010, 10:03 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
In your user's home directory you should find a file named .shrc. In that file, you may already have default aliases. Just add another: alias ll="ls -al"

To have the alias available immediately, when you have edited and saved your .shrc, issue the command "source .shrc".

Last edited by bigrigdriver; 12-14-2010 at 11:59 PM.
 
Old 12-15-2010, 01:25 AM   #3
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Original Poster
Rep: Reputation: 35
Thanks, but it looks like the uClinux that powers this appliance doesn't include alias:

Code:
/root> source .shrc
source: not found

/root> alias ll='ls -al'
alias: not found
I'll check how Busybox was compiled, and see if I can add alias to it.

Thank you.
 
  


Reply



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
aliases issue using /etc/aliases lensem Linux - Software 3 04-14-2009 12:48 PM
BusyBox doesn't go away Grife DamnSmallLinux 0 08-23-2007 02:01 AM
wrap lines at 80 for long aliases in .aliases.csh jhwilliams Linux - Software 0 07-26-2007 07:49 AM
sendmail and NIS databases (aliases, mail.aliases) - what kind of databases? cotton213 Linux - Software 0 03-14-2006 05:57 PM
Busybox and vi krizzz Linux - Software 3 03-24-2005 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:10 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
Open Source Consulting | Domain Registration