LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-09-2013, 07:08 AM   #1
rajini23
Member
 
Registered: Sep 2011
Posts: 152

Rep: Reputation: Disabled
Unhappy Windows command should work in linux machine


Hi,
we have linux, solaries server and windows machine users from
windows machine wants to access my linux machine and when they use the windows command linux should under stand with his format and wants to display output..

please help me how to convert windows commands in linux format to display output

example:-
if windows user give the command like "DIR" which lists all the directory & files in windows command promt such a way that if access the linux machine using putty or some other software if he give the same "DIR" command it wants to list the file&folders of linux....
 
Old 01-09-2013, 07:17 AM   #2
descendant_command
Member
 
Registered: Mar 2012
Posts: 802

Rep: Reputation: 182Reputation: 182
Set some alias in ~/.bash_aliases or ~/.bashrc like
Code:
alias DIR='ls -l'
 
Old 01-09-2013, 08:47 AM   #3
rajini23
Member
 
Registered: Sep 2011
Posts: 152

Original Poster
Rep: Reputation: Disabled
Thanks for your reply, i have more than 200 Server how can i updaate alias in all the servers, is ther any software kind on thing
which will be helpful
 
Old 01-09-2013, 09:16 AM   #4
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,767

Rep: Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613
Quote:
Originally Posted by rajini23 View Post
Thanks for your reply, i have more than 200 Server how can i updaate alias in all the servers, is ther any software kind on thing
which will be helpful
There are tools like puppet or fanout, but honestly, I'd not do it at all.

The only thing you're doing is adding greater levels of complexity to a server, and (depending on what you have installed on the Linux system), one of those aliases could conflict with another (valid) Linux command. Also, bear in mind that "DIR" is different from "dir" in Linux, since things are case-sensitive. The best thing you can do is to NOT do this, and educate your users. A crutch like this only is going to make things more difficult and confusing for the administrators, and for the users. What if one leaves and goes to another company...then wonders why "dir" isn't working on Linux?
 
1 members found this post helpful.
Old 01-10-2013, 01:58 AM   #5
rajini23
Member
 
Registered: Sep 2011
Posts: 152

Original Poster
Rep: Reputation: Disabled
Hi,

when i am trying alias command in linux machine it works, but when i try using ssh it is not working,i have add the alias bdf='df -h' in .bashrc,.bash_profile & .profile files which is avaliable still it is not working.please help me on this...

#ssh test@192.168.10.2 bdf
bash: bdf: command not found
 
Old 01-10-2013, 04:10 PM   #6
sleddog
Member
 
Registered: Jan 2002
Location: Labrador, Canada
Distribution: CentOS, Debian
Posts: 182

Rep: Reputation: 35
Quote:
Originally Posted by rajini23 View Post
Hi,

when i am trying alias command in linux machine it works, but when i try using ssh it is not working,i have add the alias bdf='df -h' in .bashrc,.bash_profile & .profile files which is avaliable still it is not working.please help me on this...

#ssh test@192.168.10.2 bdf
bash: bdf: command not found
Just to note... any changes you make to .bashrc or .profile will only take effect when those files are read (at login). So logout and log back in, then try the alias...

Last edited by sleddog; 01-10-2013 at 04:12 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do I run a remote command on a Windows XP machine? laredotornado Linux - Newbie 4 06-26-2011 06:55 AM
Restarting Windows machine stops Linux machine mounting/connecting jamespetts Linux - Networking 3 05-29-2008 03:12 AM
how to shutdown,restart and log off windows machine remotely through a linux machine deepak rawat Fedora 1 05-23-2006 01:25 AM
sharing internet from a windows 98 machine to a Red Hat Linux machine ritwiksolutions Linux - Newbie 7 03-14-2006 10:20 AM
i can't browse my linux machine from windows machine's network neighbourhood window yagneshmistry Linux - Networking 2 08-10-2004 02:52 AM


All times are GMT -5. The time now is 11:05 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration