Cross platform commands for Windows and Unix

Ch is a C compatible platform-independent shell. The following tables contain a summary of commonly used commands portable across different platforms in Ch under both Unix and Windows. There are more than 250 Unix commands in Ch for Windows 32 and 64 bits as listed at the end of this page. Some commonly used commands are listed below by category. These commands are very useful for shell programming in Ch.

If you are interested in knowing more about Ch shell programming, click here.

If you would like to have other Unix commands included in Ch for Windows for shell programming, please contact us.

1. File Systems
CommandUsage
cd change working directory
chgrp change the group of a file or library
chmod change the access permission of a file
chown change the owner of a file or library
cp copy files or directories
dd use to block input/output operations on files and performing conversions on them
df ("disk free") reports available space and space in use in drives accessible by your system
du report the amount of disk space used by a hierarchy of directories
find search for files or directories that match a certain criterion, i.e. name, modification time etc
ln make a hard link or symbolic link
ls list contents of directory
mkdir create a new directory
mv rename files or move them to other directory
pwd print name of working directory
rm remove files or directories
rmdir remove directories
touch create a new empty file or update the modification time of an existing file
wget a non-interactive network retriever
which show the full path of commands, functions, header files

2. Binary Files
CommandUsage
ar archive maintenance utility; create libraries to be linked to other programs
nm list the symbol in an executable, object file or libary
ranlib generate an index for an ar format archive; enables faster linking
size print the sizes of sections in object files and executable programs
strings print the ASCII text strings embedded in binary file
strip remove debugging symbols and line number information from files to make file smaller
wget Download files using http or ftp URL
curl Download files using http or ftp URL
hexdump Dump files in hexadecimal numbers and ASCII characters

3. Text Files
CommandUsage
awk scan one or more files and perform an action on all of the lines that match a particular conditon
cat concatenate files together and send the result to the standard output
cksum calculate a CRC checksum for files
csplit context based file splitter
cut cut out selected fields of each line of a file
egrep search a file for a pattern using full regular expressions
expand replace the tabs in a file with a specified number of spaces
fgrep searched a file for fixed-character string
fmt simple text formatters
fold wrap files to fit in a specified number of columns
grep include also grep,egrep and fgrep; search for patterns matching on lines in a file
head print a specified number of lines from the beginning of a file
indent formatter for C source code
join conditionally merge two files together based on matching fields in the files
less a display paginator similar to more and pg in UNIX
make update a file based on a series of dependency rules stored in a special format
md5sum calculate a "fingerprint" for files using the MD5 algorithm
more copy by the screenful
nl add line number to files
od dump the contents of a file in a number format, including octal,hex and several ASCII format
patch apply changes to files
paste merge multiple files together into one file by concatenating lines from each file to form one line in the output file
pr pring files
sed "stream editor" based on the line editor ed; useful for editing streams of data
sort sort lines in a file based on fields in the file
split cut files into multiple fixed size pieces
sum calculate a simple checksum for files
tail print a specified number of line from the end of a file
tr character translation
tsort topological sort
trofftypeset or format documents
unexpand "unexpand" sequences of a specified number of spaces into tab characters
uniq remove duplicate lines from a sorted file
vi screen text editor
vim improved vi with syntax highlighting for Ch
wc count characters, words and/or lines in a file

4. Comparing Files
CommandUsage
cmp compare two files and display the line and byte number differences
comm report common lines in two files
diff compare files, showing lines that differ in any of serveral formats
diff3 compare three files
sdiff compare two files side by side and interactively merges them into a third file

5. Shell Utilities
CommandUsage
basename echo its argument, a file name, minus any directory name
date display date and time of the system
dirname print the directory component of file name
echo print its argument\\
env used to modify the environment in which a program is run
expr evaluate various types of expressions involving arithmetic,relational,logical and string operators
factor get all prime factors for a positive integer
hostname the name of the local host machine
id display the user and group IDs and names
lognamedisplay the user's login name
pathchk check path names
printenv ouput the environment under which a command will execute
sh the Bourne shell
sleep stop all actions in a shell for a specified period of time
tee copy its standard input to files named on the command line and also to standard output
uname display information about computer system; set node name (system name)
whoami display the login name
xargs construct argument lists and invoke utility

6. Archiving Files
CommandUsage
cpio file archiving and backup utility
gzip file compression program; does both compressing and uncompressing
gunzip same as gzip
tar create and manipulate tar archives

7. Portable Unix Commands in Windows 32 and 64 bits for Interactive Command Shell and Shell Programming ar.exe expr.exe mkfifo.exe table-from.exe astyle.exe factor.exe mknod.exe table-to.exe at.exe false.exe move.exe tac.exe awk.exe fgrep.exe mv.exe tail.exe basename.exe file.exe nawk.exe tar.exe bash.exe filetype-compile.exe nice.exe tbl.exe bunzip2.exe filetype.exe nl.exe tee.exe bzcat.exe find.exe nm.exe test.exe bzcmp findstr.exe nohup texinfo2man.exe bzdiff fmt.exe nohup.exe time.exe bzegrep fold.exe od.exe title.exe bzfgrep funzip.exe paste.exe touch.exe bzgrep gawk.exe patch.exe tree.exe bzip2.exe gdate.exe pathchk.exe tr.exe bzip2recover.exe gecho.exe pcre-config troff.exe bzless ginstall.exe pcregrep.exe true.exe bzmore gln.exe pcretest.exe tsort.exe bznew gmkdir.exe pgawk.exe tty.exe cacls.exe graftabl.exe pic.exe type.exe cat.exe grcat.exe pinky.exe uname.exe chcp.exe grep.exe pr.exe uncompress chgrp.exe grmdir.exe printenv.exe unexpand.exe chide.exe groff.exe print.exe uniq.exe chmod.exe grotty.exe printf.exe unlink.exe chown.exe groups ptx.exe unzip.exe chroot.exe gsar.exe pwcat.exe updatedb chs.exe gsort.exe pwd.exe uptime.exe cksum.exe gunzip.exe ranlib.exe uzexampl.exe cls.exe gzexe readlink.exe vdir.exe cmp.exe gzip.exe recover.exe ver.exe comm.exe head.exe ren.exe verify.exe comp.exe hexdump replace.exe vi9x.exe convert.exe hostid.exe restore.exe vint.exe copy.exe hostname.exe rgrep vol.exe cp.exe iconv.exe rmdir.exe wc.exe csplit.exe id.exe rm.exe wget.exe curl.exe igawk sdiff.exe whoami.exe cut.exe indent.exe sed.exe xargs.exe date.exe install.exe seq.exe yes.exe dd.exe join.exe setuidgid.exe zcat.exe del.exe kill.exe sha1sum.exe zcmp df.exe lessecho.exe sh.exe zdiff diff3.exe less.exe shred.exe zegrep diff.exe lessfile size.exe zfgrep dir.exe lesskey.exe sleep.exe zforce dirname.exe lesspipe sort.exe zgrep diskcomp.exe ln.exe split.exe zipcloak.exe du.exe locate.exe start.exe zip.exe echo.exe logname.exe stat.exe zipinfo.exe egrep.exe ls.exe strings.exe zipnote.exe endlocal.exe make.exe strip.exe zipsplit.exe env.exe man stty.exe zless eqn.exe mawk.exe su.exe zmore erase.exe md5sum.exe sum.exe znew expand.exe mkdir.exe sync.exe