Tag: Command line
Understand Ant command line arguments with Examples
Several tasks take arguments that will be passed to another process on the command line. To make it easier to specify arguments that contain space characters, nested arg elements can be used.
value – a single command-line argument; can contain space characters.
file – The name of a file as a single command-line argument; will be replaced with the absolute filename of the file.
path – A string that will be treated as a path-like string as a single command-line argument; you can use ; or : as path separators and Ant will convert it to the platform’s local conventions.
pathref – Reference to a path defined elsewhere. Ant will convert it to the platform’s local conventions.
line – a space-delimited list of command-line arguments.
It is highly recommended to avoid the line version when possible. Ant will try to split the command line in a way similar to what a (Unix) shell would do, but may create something that is very different from what you expect under some circumstances.
Examples
<arg value=”-l -a”/>
is a single command-line argument containing a space character.
<arg line=”-l -a”/>
represents two separate command-line arguments.
<arg path=”/dir;/dir2:\dir3″/>
is a single command-line argument with the value \dir;\dir2;\dir3 on DOS-based systems and /dir:/dir2:/dir3 on Unix-like systems.
Command-line Options Summary
ant [options] [target [target2 [target3] …]]
Options: | |
-help, -h | Displays help information describing the Ant command and its options |
-projecthelp, -p | Print project help information |
-version | Print the version information and exit |
-diagnostics | Print information that might be helpful to diagnose or report problems. |
-quiet, -q | Suppresses most messages not originated by an echo task in the buildfile |
-verbose, -v | Displays detailed messages for every operation during a build. |
-debug, -d | Print debugging information |
-emacs, -e | Produce logging information without adornments |
-lib <path> | Specifies a path to search for jars and classes |
-logfile <file> | Use given file for log |
-l <file> | Use given file for log |
-logger <classname> | Specifies a class to handle Ant logging. |
-listener <classname> | Add an instance of class as a project listener |
-noinput | Do not allow interactive input |
-buildfile <file> | Use given buildfile |
-file <file> | Use given buildfile |
-f <file> | Use given buildfile |
-D<property>=<value> | Defines a property name-value pair on the command line. |
-keep-going, -k | execute all targets that do not depend on failed target(s) |
-propertyfile <name> | load all properties from file with -D properties taking precedence |
-inputhandler <class> | the class which will handle input requests |
-find <file> | Search for buildfile towards the root of the filesystem and use it |
WinZip Command Line | WinZip Command line CheatSheet – Reference
The default action is to add or replace zipfile entries from list, which can include the special name – to compress standard input. If zipfile and list are omitted, zip compresses stdin to stdout.
-f freshen: only changed files -u update: only changed or new files
-d delete entries in zipfile -m move into zipfile (delete files)
-k force MSDOS (8+3) file names -g allow growing existing zipfile
-r recurse into directories -j junk (don’t record) directory names
-0 store only -l convert LF to CR LF (-ll CR LF to LF)
-1 compress faster -9 compress better
-q quiet operation -v verbose operation/print version info
-c add one-line comments -z add zipfile comment
-b use “path” for temp file -t only do files after “mmddyy”
-@ read names from stdin -o make zipfile as old as latest entry
-x exclude the following names -i include only the following names
-F fix zipfile (-FF try harder) -D do not add directory entries
-A adjust self-extracting exe -J junk zip file prefix (unzipsfx)
-T test zipfile integrity -X eXclude eXtra file attributes
-$ include volume label -S include system and hidden files
-h show this help -n don’t compress these suffixes
“Cheat Sheet” of Perforce command-line | Perforce command-line Guide
A way to remember data-mining commands | ||||||||||||||||||||||||||||||||||||||||||
The following is a set of questions that will be used during the Perforce training to remind students which “data-mining” commands to use for specific situations. Perforce is a terrific tool, but it’s easy to get lost in the choices between “p4 files” and “p4 changes” and “p4 filelog” and so on. This list can help a great deal.
|
||||||||||||||||||||||||||||||||||||||||||
“Cheat Sheet” of Perforce command-line | ||||||||||||||||||||||||||||||||||||||||||
The following list is a set of helpful commands that anyone can run, but that the person administering the Perforce codelines will be using a lot. They’re included here for quick reference.
|
Windows XP/2000 Commands & Tools | Windows XP Command-line Reference
Here’s the ultimate Windows XP/2000 command list that will make any Linux user feel at home at the command prompt. A lot of these commands are intended for administrating a network, but they are great for savvy home users as well. We even listed which OS you need for these commands.
Many thanks to the digg users who ‘dugg’ our site and care to leave comments of helpful commands that we have left out!
- at (windows XP/2000)
Scheduling utility. - bootcfg (XP only)
This utility allows you to set up your boot options, such as your default OS and other loading options. - cacls (XP, 2000, & NT4.0)
Changes the ACLs (security Settings) of files and folders. Very similar to chmod in Linux. - comp (XP & 2000)
This utility is very similar to diff in Linux. Use the /? switch to get examples of command usage. - contig (works with NT4.0 and newer)
A great defrag utility for NTFS partitions. - control (XP only) – unpublished!
Allows you to launch control panel applets from the command line. control userpasswords2, for example will launch a helpful local user admin utility. - defrag (XP only – NT4.0 and Win2k use contig)
Yes, XP comes with a command line disk defrag utility. If you are running Win2k or NT4.0 there is still hope. Contig is a free defrag program that I describe on the defrag page. - diskpart (XP only)
Use this command to manage your disk partitions. This is the text version for the GUI Disk Manager. - driverquery (XP only)
Produces a list of drivers, their properties, and their versions. Great for computer documentation. - eudcedit (XP only) – unpublished!
Private Character editor. Yes with this program built into Windows XP you can create your own font! - fsutil (XP only) – unpublished!
This is a utility with a lot of capability. Come back soon for great examples. - getmac (XP & 2000)
This command gets the Media Access Control (MAC) address of your network cards. - gpresult (XP & 2000)
This generates a summary of the user settings and computer group policy settings. - gpupdate (XP only)
Use this utility to manually apply computer and user policy from your windows 2000 (or newer) domain. - ipconfig (XP, 2000 & NT4.0)
This handy tool displays IP settings of the current computer and much more. - MMC (XP, 2000 & NT4.0) – Microsoft Management Console
This is the master tool for Windows, it is the main interface in which all other tools use starting primarily in Windows 2000 and newer systems. - more
Utility used to display text output one screen at a time. Ex. more c:\windows\win.ini - msconfig (XP only)
The ultimate tool to change the services and utilities that start when your Windows machine boots up. You can also copy the executable from XP and use it in Win2k. - msinfo32 (XP &smp; 2000)
An awesome diagnostic tool. With it you can get a list of running processes, including the residing path of the executable (great for manually removing malware) and get detailed information about hardware and system diagnostics. - narrator (XP only)
Turns on the system narrator (can also be found in accessibility options in control panel). Will will allow your computer to dictate text to you. - netsh (XP & 2000)
A network configuration tool console. At the ‘netsh>’ prompt, use the ‘?’ to list the available commands and type “exit” to get back to a command prompt. - nslookup (all)
A DNS name resolution tool. - openfiles (XP Only)
Allows an administrator to display or disconnect open files in XP professional. Type “openfiles /?” for a list of possible parameters. - Pathping (XP & 2000)
A cross between the ping and traceroute utilities. Who needs Neotrace when you can use this? Type “pathping <ip address>” and watch it go. - recover (XP & 2000)
This command can recover readable information from a damaged disk and is very easy to use. - reg (XP & 2000)
A console registry tool, great for scripting Registry edits. - sc (XP & 2000)
A command line utility called the Service Controller. A power tool to make service changes via a logon/logoff or startup/shutdown script. - schtasks (XP only)
A newer version of the AT command. This allows an administrator to schedule and manage scheduled tasks on a local and remote machines. - secedit (XP & 2000)
Use this utility to manually apply computer and user policy from your windows 2000 (or newer) domain. Example to update the machine policy: secedit /refreshpolicy machine_policy /enforce
To view help on this, just type secedit.
NOTE: In Windows XP SP1 and news, this command is superceded by: gpupdate /force - sfc (XP & 2000)
The system file checker scans important system files and replaces the ones you (or your applications) hacked beyond repair with the real, official Microsoft versions. - shutdown (XP & 2000)
With this tool, You can shut down or restart your own computer, or an administrator can shut down or restart a remote computer. - sigverif (XP only)
Microsoft has created driver signatures. A signed driver is Microsoft tested and approved. With the sigverif tool you can have all driver files analyzed to verify that they are digitally signed. Just type ‘sigverif’ at the command prompt. - systeminfo (XP only)
Basic system configuration information, such as the system type, the processor type, time zone, virtual memory settings, system uptime, and much more. This program is great for creating an inventory of computers on your network. - sysedit (XP/2000)
System Configuration File Editor. An old tool that was very handy for the Windows 9X days. msconfig is what you want to use now. - tasklist (XP pro only)
Tasklist is the command console equivalent to the task manager in windows. It is a must have when fighting scumware and viruses. Try the command:
tasklist /svc
to view the memory resources your services take up. - taskkill (XP only)
Taskkill contains the rest of the task manager functionality. It allows you to kill those unneeded or locked up applications. - tree (XP & 2000)
An amazing experience everyone should try! This command will provide a ‘family tree’ style display of the drive/folder you specify. - WMIC (XP & 2000)
Windows Management Instrumentation Command tool. This allows you to pull an amazing amount of low-level system information from a command line scripting interface.
Command line switches of devenv.exe | Devenv command line switches Guide
To see this list, type devenv /? on command prompt
-
- /build – build the specified solution configuration
-
- /project – specifies the project to build instead of solution, must specify /build to use /project
-
- /projectconfig – specifies project configuration to build, must specify /project to use /projectconfig
-
- /out – write build output to specified file
-
- /rebuild – like /build, but forces a clean first
-
- /clean – clean up build outputs
-
- /deploy – build the specified solution configuration and then deploy it
-
- /run – run the specified solution configuration
-
- /runexit – run the specified solution configuration and then terminate
-
- /command – executes the specified internal command line after startup
-
- /mditabs – use tabbed documents interface
-
- /mdi – use MDI interface
-
- /fn – use specified font name
-
- /fs – use specified font size
-
- /LCID – use specified language ID
-
- /noVSIP – disables VSIP developers license key for VSIP testing
-
- /safemode – only default environment and services load for stability
- /resetskippkgs – allow VSPackages once flagged for loading failures to load again
How to run Remote Desktop Console by using command line?
How to run Remote Desktop Console using command line |
If you may want to run Desktop Console from a batch file, for example RDC over VPN, you can use mstsc /v:servername /console command.
Mstsc Creates connections to terminal servers or other remote computers, edits an existing Remote Desktop Connection (.rdp) configuration file, and migrates legacy connection files that were created with Client Connection Manager to new .rdp connection files. Syntax mstsc.exe {ConnectionFile | /v:ServerName[:Port]} [/console] [/f] [/w:Width /h:Height] ConnectionFile Specifies the name of an .rdp file for the connection. /console /f /w:Width /h:Height /edit”ConnectionFile” /migrate Remarks To connect to the console session of a server, type: To open a file called filename.rdp for editing, type: |
Ant command line arguments – Examples – Summary
Ant command line arguments | ||||||||||||||||||||||||||||||||||||||||||||
Several tasks take arguments that will be passed to another process on the command line. To make it easier to specify arguments that contain space characters, nested arg elements can be used.
value – a single command-line argument; can contain space characters. It is highly recommended to avoid the line version when possible. Ant will try to split the command line in a way similar to what a (Unix) shell would do, but may create something that is very different from what you expect under some circumstances. |
||||||||||||||||||||||||||||||||||||||||||||
Examples | ||||||||||||||||||||||||||||||||||||||||||||
<arg value=”-l -a”/> is a single command-line argument containing a space character. <arg line=”-l -a”/> represents two separate command-line arguments. <arg path=”/dir;/dir2:\dir3″/> is a single command-line argument with the value \dir;\dir2;\dir3 on DOS-based systems and /dir:/dir2:/dir3 on Unix-like systems. |
||||||||||||||||||||||||||||||||||||||||||||
Command-line Options Summary | ||||||||||||||||||||||||||||||||||||||||||||
ant [options] [target [target2 [target3] …]]
Options:
|
||||||||||||||||||||||||||||||||||||||||||||
Command Line to find a Change list properties in perforce server
Command Line to find a Change list properties and associated path of the file in perforce server view:
Examples of the command you want:
p4 describe 1231928
p4 describe -s 1231928
p4 files @=1231928
Where 1231928 is the change list number.
Batch Script to Login and sync the files from perforce | Step by step guide
Batch Script to Login Perforce server using command line
Step 1: Create a new text file
Step2: Copy following command
%path%
@echo on
p4 -p172.28.16.2:1666 -uUserName -P”Password” -c”Client_Name” client –o
Where
UserName is User name of perforce server
Password is Password of the perforce server.
Client_Name is the existing perforce client
Step3: Save with .bat extension
Step4: Run the batch file
Batch Script to Login and sync the files from perforce view
Step 1: Create a new text file
Step2: Copy following command
@echo off
p4 -c Client_Name -p 172.28.16.2:1666 -u UserName-P Password sync -f //SEABU/LiveStateDelivery/LSDMaintenance/Components/Webadmin/… //SYSTEMBUILDSTAR/LiveStateDelivery/LSDMaintenance/Components/Webadmin/…
Where
UserName is User name of perforce server
Password is Password of the perforce server.
Client_Name is the existing perforce client
Step3: Save with .bat extension
Step4: Run the batch file