Showing posts with label Command Prompt Commands. Show all posts
Showing posts with label Command Prompt Commands. Show all posts

Top 10 Internal and External DOS Commands

Posted by Bhavesh Joshi On Wednesday, January 23, 2013 0 comments

Top 10 Internal and External MS DOS Commands
Top 10 Internet Commands are as follows:

1. Date: When we type the Date command and press enter, it will display the current date in the format mm-dd-yy, (here mm belongs to months, dd belongs to day and yy belongs to year), and it will ask for new date.

Example:
Current date is Thu 03-16-2001
Enter new date (mm-dd-yy)

Here, it will ask you to change the date, if you want to change it.

2. Time: When we type the Time command and press enter, it will display the current time in the format HH:MM:SS.MS, (here HH belongs to Hour, MM belongs to Minute and SS belongs to Second), and it will ask for new time.

Example:
Current time is 12:10:45.56

Enter new time: Here, it will ask you to change the time, if you want to change it.

3. DIR Command: The main function of DIR command is to display the list of files and directories (folders). It displays the whole information including file name, extension, size, date, time and attributes of the files and directories. For all this you have to simply type the Dir and Press enter. It has some forms:

1) DIR/P: Used for page wise listing of directories and files.
2) DIR/W: Used for seeing the entries the sub directories width wise.
3) DIR/S: Used for seeing the sub directories and files.

4. MD Command: it is used for creating new directory Syntax is:  MD

For Example - if you want to create a directory (folder) named TechKoW then MD TechKoW

If the path is not given then, the directory will be created in the current drive.

5. CD Command: This command is used to switch from one directory (folder) to another. That is, it is used to change the directory. The syntax is C:\> CD  

For Example- If you want to go inside the TechKoW directory C:\> CD TechKoW

C:\ TechKoW> It shows that now you are in TechKoW directory. To exit/come out of this directory, just type CD..

6. RD Command: This command is used to remove the directories or subdirectories. To use it, it is necessary that directory or subdirectory which you are going to remove or delete is empty.

C:\>RD

For Example: If you are in TechKoW directory, and you want to remove English sub-directory from it, it is essential to remove all the subdirectories of English first, then only you can remove English through command - RD English

7. Copy Command: The copy command is one of the most versatile of internal commands. The copy command is used to make duplicate of the original. The copy command syntax is
C>COPY

Ex. To make a duplicate copy of a file called by the name first.txt as second.txt
C:>COPY FIRST. TXT SECOND.TXT

8. Delete Command: The delete command is used for remove or erase the file from disk just like as we dispose of unwanted paper files from file folder. The delete command syntax is
C:\>DEL

Ex. Suppose we remove a file first.txt from the disk so we enter the flowing command on prompt  C:\>DEL FIRST.TXT

9. Rename Command: The rename command (or REN for short) can change a file's name or extension or both. The rename command has two parameters:

REN

oldname is the name of existing file and newname is new name for old file.
Ex. REN FIRST.TXT HELLO.TXT

10. PATH Command: The path command tells DOS where to look for command file if its not in the current directory or Internal Command (transient portion of Command.com). The DOS PATH command allows you to specify several subdirectories that DOS will travel in search of external commands. For Example type the following command on prompt

C:\>PATH=C:\DOS;C:\VVS5::\FOX2

DOS search for command in the current path; then in the DOS directory followed by VVS5 and FOX2 directory.

Top 10 Internet Commands

Top 10 External Commands are as follows:

1. CHKDSK: The CHKDSK command allows you to find out if your disk contains changes of lost clusters. When DOS writes information to disk, an error can occur. Although it is rare, but CHKDSK command can help you in correcting these errors. CHKDSK will examine disk and display following information

The total amount of disk.
Disk volume name.
The no. Files and directories and disk space occupied.
Disk space free for storage.

The chkdsk command has the following syntax:

C:\>CHKDSK [volume[[path] filename]]] [/F] [/V]

volume    Specifies the drive letter, mount point, or volume name filename    FAT/FAT32 only: Specifies the files to check for fragmentation

/F Fixes errors on the disk
/V On FAT/FAT32: Display the full path and name of every file of disk.

2. DISKCOPY: The disk copy, command makes an exact duplicate of the original disk. If the disk (target) to be copied is not formatted (remember, the disk needs to be prepared before use), it will format the disk and copy the contents of the original disk (called as source disk) sector by sector. Disk copy works only with disks of same size and capacity. The diskcopy command has three parameters

C:\>DISKCOPY
/V Verifies that the information is copied correctly.

3. XCOPY: The XCOPY command is one of the most versatile of external command. The xcopy command is used to Copies files and directory trees. The xcopy command syntax is
XCOPY source [destination]

source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files or directory.

/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones. Same as /S /E may be used to modify /T.
/V Verifies each new file.
/W Prompts you to press a key before copying.
/T Creates directory structure, but does not copy files Does not include empty directories or subdirectories.
/T /E includes empty directories and subdirectories.
/-Y Causes prompting to confirm you want to overwrite an existing destination file.

4. Diskcomp: The diskcomp command compares contents of two disks, sectors by sector. If diskcomp command locates errors. The diskcomp command has two parameters

C> DISKCOMP

Sort: the sort command will be use full when we want to arrange (sort) the content of a file or lines of input and send them to output (display). Output can be redirected to a file or device. If we don't specify any parameters with command, then the lines of input will be sorted in ascending order (means numerically from lowest to highest and alphabetically from A to Z). the syntax of sort command is as follows

SORT /R /+

/R (reverse) sorts the lines of input or file in reverse order.
/+ sorting the lines of input or file from the specified position, rather than starting from the first column. To sort a specified file, we have to redirect the input of the sort command flowed by the file name with the input redirection operator <. C:\>sort hello.txt

5. Find: The find command searches for text specified in one or more files. If we enter the command without parameter it filters all lines containing the specified text and display all the lines that contain specified text in the file or files. The find command and its parameters are as follows:

Find /v /c /n /1 <"text to search">
/V Displays all lines NOT containing the specified string.
/C Displays only the count of lines containing the string.
/N Displays line numbers with the displayed lines.
/I Ignores the case of characters when searching for the string. "string" specifies the text string to find.
Ex. C:\> find "Navkar" first.txt

6. DOSKEY Command: This command is initiated by typing DOSKEY and pressing enter. This command stores all DOS commands typed from the DOS prompt into the memory buffer. Any commands in the buffer are recalled by using Up or Down arrow key to list each command in the order they are stored. DOSKEY uses about 4KB of RAM. C:\> DOSKEY
Doskey installed

DOSKEY command keys:

Up/downArrow    Recall DOS commands
F7                                Displays a history of commands
Alt+F7                        Clears the history of command
F8                                Search the history of command
F9                                Select a command by the number displayed using F7.

7. TREE Command. Tree is a command that displays all directory pathnames on the specified disk. An optional /F parameter is available to let you display file names. Syntax is: TREE [drive:][path] [/F] [/A]

/F Display the names of the files in each folder.
/A Use ASCII instead of extended characters.

8. MOVE Command: The MOVE command is a command used to move a directory and one or more files from one location to another on the same disk. You can also change the name of the moved directory and/or files using the MOVE command. The MOVE command prompts you before overwriting an existing file having the same name.

MOVE [/Y /-Y] [drive:][path]dirname1 dirname2

[drive:][path]filename1     Specifies the location and name of the file or files you want to move.
Destination                               Specifies the new location of the file.
[drive:][path]dirname1      Specifies the directory you want to rename.    
dirname2                                   Specifies the new name of the directory.

/Y     Suppresses prompting to confirm you wants to overwrite an existing destination file. Causes prompting to confirm you want to overwrite an existing destination file.  
/-Y     Causes prompting to confirm you want to overwrite an existing destination file.    

By this command we can move a directory.

For example- MOVE C:\techkow1\file1.txt C:\techkow
This command moves a file named file1.txt from the \techkow1 directory to the techkow directory.

C:\> MOVE \DIR123\NEWDIR123
This command moves the directory named \DIR1 23 to a new directory named \NEWDIR123.

9. FORMAT: The FORMAT DOS Command is used to create a new root directory and file allocation table for the disk. It can also check for bad/damaged sectors on the disk and also delete all the data on the disk.

FORMAT volume [/FS:file-system] [/V:label] [/Q] [/A:size] [/C] [/X]
FORMAT volume [/V:label] [/Q] [/F:size]
FORMAT volume [/V:label] [/C)] [/T:tracks /N:sectors]
FORMAT volume [/V:label] [/Q]
FORMAT volume [/Q]

Volume     Specifies the drive letter (followed by a colon), mount point, or volume name.
/FS:             filesystem Specifies the type of the file system (FAT, FAT32, or NTFS).
/V:               label Specifies the volume label.
/Q                Performs a quick format.
/C NTFS only:  Files created on the new volume will be compressed by default.
/X                 Forces the volume to dismount first if necessary. All opened handles to the volume would no longer be valid.
/A:                size Overrides the default allocation unit size. Default settings are strongly recommended for general use.

NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
FAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
(128K, 256K for sector size > 512 bytes).
FAT32 supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K, (128K, 256K for sector size > 512 bytes).

/F:size            Specifies the size of the floppy disk to format (1.44)
/T:tracks       Specifies the number of tracks per disk side.
/N:sectors     Specifies the number of sectors per track.

Top 10 External Commands10. FDISK Command: FDISK stands for "fixed disk" an older term for the hard disk. FDISK command is used to partition your hard drive. FDISK will first ask you if you want to use all available space for the new partition. FDISK have 2048 Megabytes as the default partition size even if you have more available space on your hard drive. If this value is OK, FDISK will automatically make your new partition and set it active. If you need to change the default size of your partition, you will have to go back and manually make it active. FDISK can also be used to delete partition. This command can also be used to display the partition information for the system.
READ MORE

Command Prompt Commands

Posted by Bhavesh Joshi On Wednesday, May 30, 2012 0 comments
Command Prompt CommandsAs we know that command prompt is a non-graphical interface that allows user to directly interact with operating system. With the help of Commands, a user can solve (troubleshoot) many OS related problems. Today, mostly peoples using OS based on GUI (Graphical User Interface) as it is best way for end users to understand (run) computer and to interact with computer. But, they can’t do anything with help of GUI as commands are still the heart of the OS, which are mainly running at the core level of the OS. To perform chief tasks directly with OS, all they need is to learn commands. Commands are the main stage designed for professional (advanced) users. So, here on this page, I am representing some useful important commands based on Windows Operating System. In order to access Command Prompt in Windows Operating System, from the Start menu, select Run and enter- ‘cmd’. After this, press ‘enter’ button or click on ‘OK’ button. You are now ready to run any commands to perform any OS related operation.

Some Useful Important Commands are as follows:
1. In order to see files in a directory or folder then, you need is to type “dir” command and press enter to get result. 
cmd.exe
command prompt
2. To go to another partition from the current location as C:\Documents and Settings\Bhavesh then, just type “cd ..” command and press enter in order to leave that location. Type the partition name like partition G and colon as “G:” and press enter in order to enter that partition. In this way, you can enter in other partition.
Commands
3. To enter one folder to another, use “cd” command and to leave that folder, use “cd ..” command. For example, to enter in a folder of G partition as type “cd” and the name of the folder. Here, we can see that G drive has folder named “Newspaper address”. To Enter in “Newspaper address” folder, the command format will be : cd Newspaper address 
commands in cmd.exe
4. To see all the services running under each process of a computer then, use the following commands as- “tasklist /svc” and “tasklist /s” 
Command5. “Systeminfo” command is used to show the complete system information of a computer.

commands of windows os
Some more useful commands list are-
 6. ARP
     It is used to resolve Mac address

7. BOOTCFG
    It is used to editing windows boot settings CD As we know for folder access

8. CHKDSK
    It is used for checking disk problems

9. CHKNTFS
    It is for NTFS checking
  
10. CleanMgr
      To cleanup recycle bin files

11. cls
      To clear command prompt screen

12. CONVERT
      In order to converting file system

13. COPY
      Used to copy files

14. DATE
       To display date

15. DEFRAG
      Used for hard disk defragmentation

16. DEL
      Used to delete files

      DIR
      As we know to display files and folders

17. DIRUSE
      To show disk (partition) usage

18. FORMAT
       To format a Partition

19. FSUTIL
      File Utility Tools

20. FTP
      File Transfer Protocol

21. IPCONFIG
      It is used to configure and troubleshoot IP address

22. MEM
      Used to show memory usage

23. MD or MKDIR It is used to create a new folder

24. MOVE
      To move files

25. MSG
      This command is used to send message

26. NET
      Used to managing network

27. NETSH
      Used for Network Interface Configuration

28. NBTSTAT
      It is used to show network statistics (NetBIOS over TCP/IP)

29. NTBACKUP
       It is used to backup files to a specified location

30. PATHPING
      To show network latency and loss of packet

31. PING
      To test network connectivity

32. RECOVER
      To fix damage files

33. REGEDIT
      This command is used to registry data settings

34. RD or RMDIR
      Used to delete any folder

35. ROUTE
      It is used for Routing tables add and show

36. SHUTDOWN
      To showdown computer

37. START
      To start program/command window

38. TASKLIST
      This command is really important as used to display all the running services and applications of your computer

39. VOL
       Used to show disk label

40. XCOPY
      Command is for copying files and folders

These above commands are really the top useful important commands of command prompt in windows operating system. Through above commands, you can do everything based on your need. It must important for advanced users to learn above commands and to follow it for your daily purpose. 

I hope you like this page; feel free to make comment (feedback)… 

READ MORE