LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-13-2004, 07:04 PM   #1
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Rep: Reputation: 30
make an alias in winXP


In linux you can make alias commands in ~/.bashrc like

alias dir='dir /p'

Now when you type dir in command line it will treat it like 'dir /p'

Is there a way to do this in windows? Obviously one could write a prog that would just shell the other with the params, but looking for an easy way like in linux.
 
Old 09-13-2004, 09:17 PM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Well, you can install cygwin http://www.cygwin.com and use bash under windows

You could also try 4NT from http://www.jpsoft.com.

Otherwise, I don't know of a way to do this other than writing batch files (but you couldn't create replacements for builtin commands like dir - that is, if you made a dir.bat, it wouldn't be run by default if you typed dir, regardless of your PATH).

On the other hand, if you want to alter the default dir, you can set the DIRCMD environment variable (see dir /?), but this is specific to each command.
 
Old 09-14-2004, 08:33 AM   #3
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Original Poster
Rep: Reputation: 30
Yeah, I thought about cygwin, but I wanted to see if there was an easier (smaller) way. Thanks for the thoughts.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I make an alias? quintan Linux - Software 2 11-25-2005 03:44 AM
How to make an alias? Gins Linux - General 6 06-06-2005 07:13 PM
How to make alias of 'ls' in winxp/dos servnov General 4 11-04-2004 08:39 PM
Make symbolic link or alias gubak Linux - Newbie 5 08-20-2004 12:50 PM
How do i make an alias on my webserver? meluser Linux - Software 14 03-13-2003 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:52 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