Full Version: Common Linux & Dos commands
Dream.In.Code > Programming Tutorials > Linux Tutorials
no2pencil
Common Linux & Dos commands, broken down, showing their similarity, differances, & syntax.
These are listed by :
Linux command : dos command
Linux command is in lower case, followed by options.
Dos command is in upper case, followed by options.

The syntax of the linux commands was gathered via the man pages, & the syntax for the dos command was gathered via the /? option.

List a directories contents
CODE

ls : dir
ls [OPTION]... [FILE]...

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]


Copy files and directories
CODE

cp : copy
cp [OPTION]... SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... --target-directory=DIRECTORY SOURCE...

COPY [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination [/A | /B]]


Search for files in a directory hierarchy
CODE

find : dir /s
find [-H] [-L] [-P] [path...] [expression]

dir /s Displays files in specified directory and all subdirectories.


Delete files
CODE

rm : del
rm [OPTION]... FILE...

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names


Delete directories
CODE

rm -r : rmdir
rm -r, -R, --recursive

RMDIR [/S] [/Q] [drive:]path


Create a directory
CODE

mkdir : mkdir
mkdir [OPTION] DIRECTORY...

MKDIR [drive:]path



Copy a files contents to standard output
CODE

cat : type
cat [OPTION] [FILE]...

TYPE [drive:][path]filename


Create the file system
CODE

mke2fs: format
mke2fs [ -c | -l filename ] [ -b block-size ] [ -f fragment-size ] [ -g blocks-per-group ] [ -i bytes-per-inode] [ -j ] [ -J journal-options ] [ -N number-of-inodes ] [ -n ] [ -m reserved-blocks-percentage ] [ -o  creator-os  ]  [ -O feature[,...]  ] [ -q ] [ -r fs-revision-level ] [ -E extended-options ] [ -v ] [ -F ] [ -L volume-label ] [ -M last-mounted-directory ] [ -S ] [ -T filesystem-type ] [ -V ] device [ blocks-count ]

FORMAT volume [/FS:file-system] [/V:label] [/Q] [/A:size] [/C] [/X]
FORMAT volume [/V:label] [/Q] [/F:size]
FORMAT volume [/V:label] [/Q] [/T:tracks /N:sectors]
FORMAT volume [/V:label] [/Q] [/1] [/4]
FORMAT volume [/Q] [/1] [/4] [/8]
kamban
thanks any important code send my email
Thorian
That is some good stuff man.
lanec42
AH! Very cool.
nitin_c_c++
Good details for basic command on both system

cheers
nitin
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.