Sponsored Content
Special Forums Windows & DOS: Issues & Discussions what is the DOS equivalent of alias command? Post 302299950 by carlos25 on Sunday 22nd of March 2009 01:21:04 PM
Old 03-22-2009
I know I'm rather late on this but it might help others...

You can use doskey to create an alias on any version of windows up to Windows XP (I'm not sure if it's available on Vista).
Code:
C:> doskey alias_name=command

doskey will only work within the environment that it's invoked in and if you want the aliases to be available every time you start cmd.exe will need to write a script that will load them upon invoking your cmd prompt (cmd /K "My_Environment_Script.bat").

Example:

I often need to change drives and cd doesn't handle it very well but chdir does. However, the length of the command is tiresome to type every time I need it so I do this...
Code:
doskey cdd=chdir /D %1

So when I type:

cdd F:

The command prompt will change to F:>

More information on DosKey can be found here:

DOSKey - Wikipedia, the free encyclopedia
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

SQL Spool equivalent command in DOS

This question maybe in the wrong category but I'm posting here due to urgency. In DOS is there a command to perform a similar function to spool command in SQL or Script command in UNIX? I want to print all command line output to a file but I don't want to use the echo command for each line. ... (2 Replies)
Discussion started by: stevefox
2 Replies

2. UNIX for Dummies Questions & Answers

DOS command for ps

I have navigated every DOS and UNIX FAQ to find the DOS equivalent of the UNIX ps command (ps -f would be even better) but all listings of DOS<>UNIX commands do not have it (they all have the same basic commands listed). DOS must have a way of detecting running processes and TSRs. mem /c is the... (7 Replies)
Discussion started by: dancingfool
7 Replies

3. UNIX for Advanced & Expert Users

Command equivalent to DOS mode for SCO 5.0.6

I need to set the serial port attributes to 9600,7,E,1 in order to read and write data to it from within a Foxpro program. Unfortunately there is no function in Foxpro to set the line attributes, only open. close read and write. Stty only works on the stdout and stdin in this release, and the... (3 Replies)
Discussion started by: jgt
3 Replies

4. UNIX for Dummies Questions & Answers

Unix equivalent of DOS set

Hi all, what is the equivalent command of the DOS set that lists all the environment variable and their values? Xavier. (3 Replies)
Discussion started by: xxavier
3 Replies

5. Shell Programming and Scripting

Command for unix to dos conversion

Dear All Could you please advice how do we convert a unix file to dos I know one command,ux2dos, which somehow does not work to give desired output Inputs on this is appreciated Thanks, Suresh (3 Replies)
Discussion started by: sureshg_sampat
3 Replies

6. Windows & DOS: Issues & Discussions

dos/intel unix command equivalent

In Unix I can use command line to do a find for files older than so many days and remove them. I can also capture the date to see if its a saturday and do something different. Are there any dos/intel command line equivalent commands to do this on a windows 2003 server? This is from an... (6 Replies)
Discussion started by: MizzGail
6 Replies

7. AIX

smitty equivalent command line command

i know after you do something in smitty via the gui, you can click something in smitty that will show you how to do the same thing via the command line, (not using the gui) can anyone tell me how (2 Replies)
Discussion started by: asyed123
2 Replies

8. Windows & DOS: Issues & Discussions

DOS Equivalent of UNIX Command

Hi, The title of this post is a little vague but I couldn't think of what to call it. In Unix you can perform the following command ftp -v IPADDRESS <<END put FILE END In a DOS command prompt, is it possible to do the same kind of thing that the "<<END" does? So for example, ... (4 Replies)
Discussion started by: Ste_Moore01
4 Replies

9. UNIX for Dummies Questions & Answers

Create the equivalent of the command WC

hi all, i'm trying to do this exercise, i want to create a script that can substitute WC command in unix, can someone help me? (11 Replies)
Discussion started by: Marina2013
11 Replies

10. Shell Programming and Scripting

Convert for command from DOS to SHELL

Well, this command has served me quite well under DOS for %%X in (*.txt) do COMMAND however in linux it just outputs: "./install.sh line 1: '%%x': not a valid identifier. Ideas ? Thanks in advance (2 Replies)
Discussion started by: pasc
2 Replies
TRACE-CMD-SPLIT(1)														TRACE-CMD-SPLIT(1)

NAME
trace-cmd-split - split a trace.dat file into smaller files SYNOPSIS
trace-cmd split [OPTIONS] [start-time [end-time]] DESCRIPTION
The trace-cmd(1) split is used to break up a trace.dat into small files. The start-time specifies where the new file will start at. Using trace-cmd-report(1) and copying the time stamp given at a particular event, can be used as input for either start-time or end-time. The split will stop creating files when it reaches an event after end-time. If only the end-time is needed, use 0.0 as the start-time. If start-time is left out, then the split will start at the beginning of the file. If end-time is left out, then split will continue to the end unless it meets one of the requirements specified by the options. OPTIONS
-i file If this option is not specified, then the split command will look for the file named trace.dat. This options will allow the reading of another file other than trace.dat. -o file By default, the split command will use the input file name as a basis of where to write the split files. The output file will be the input file with an attached '.#' to the end: trace.dat.1, trace.dat.2, etc. This option will change the name of the base file used. -o file will create file.1, file.2, etc. -s seconds This specifies how many seconds should be recorded before the new file should stop. -m milliseconds This specifies how many milliseconds should be recorded before the new file should stop. -u microseconds This specifies how many microseconds should be recorded before the new file should stop. -e events This specifies how many events should be recorded before the new file should stop. -p pages This specifies the number of pages that should be recorded before the new file should stop. Note: only one of *-p*, *-e*, *-u*, *-m*, *-s* may be specified at a time. If *-p* is specified, then *-c* is automatically set. -r This option causes the break up to repeat until end-time is reached (or end of the input if end-time is not specified). trace-cmd split -r -e 10000 This will break up trace.dat into several smaller files, each with at most 10,000 events in it. -c This option causes the above break up to be per CPU. trace-cmd split -c -p 10 This will create a file that has 10 pages per each CPU from the input. SEE ALSO
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1), trace-cmd-stop(1), trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-list(1), trace-cmd-listen(1) AUTHOR
Written by Steven Rostedt, <rostedt@goodmis.org[1]> RESOURCES
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git COPYING
Copyright (C) 2010 Red Hat, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL). NOTES
1. rostedt@goodmis.org mailto:rostedt@goodmis.org 06/11/2014 TRACE-CMD-SPLIT(1)
All times are GMT -4. The time now is 04:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy