comands linux and windows

Upload: andrey-bulicanu

Post on 06-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Comands Linux and Windows

    1/18

    LINUX COMANDS

    *Gestiunea memoriei:

    >.freefree displays the total amount of free and used physical and swap mem-

    ory in the system, as well as the buffers used by the kernel.The

    shared memory column should be ignored; it is obsolete.

    syntaxfree [-b | -k | -m] [-o] [-sdelay ] [-t] [-V]The -b switch displays the amount of memory in bytes; the -k switch

    (set by default) displays it in kilobytes; the -m switch displaysit in

    megabytes.

    The -t switch displays a line containing the totals.

    The -o switch disables the display of a "buffer adjusted" line. Ifthe

    -o option is not specified, free subtracts buffer memory from the

    usedmemory and adds it to the free memory reported.

    The -s switch activates continuous polling delay seconds apart. Youmay

    actually specify any floating point number for delay, usleep(3) isused

    for microsecond resolution delay times.

    The -V displays version information.

    Examples[user2@asp10 ~]$ free

    total used free shared buffers cachedMem: 255464 242872 12592 0 37104 119360-/+ buffers/cache: 86408 169056Swap: 497972 37828 460144

    >.topThe top program provides a dynamic real-time view of a running system.

    It can display system summary information as well as a list oftasks

    currently being managed by the Linux kernel. The types of systemsum-

    mary information shown and the types, order and size ofinformation

    displayed for tasks are all user configurable and thatconfiguration

    can be made persistent across restarts.

    The program provides a limited interactive interface for processmanip-

    ulation as well as a much more extensive interface for personalconfig-

    uration -- encompassing every aspect of its operation. And whiletop

    is referred to throughout this document, you are free to name the

    pro-gram anything you wish. That new name, possibly an alias, will

    then bereflected on top's display and used when reading and writing a

    configu-ration file.

    syntax-d : Delaytime interval as: -dss.tt (seconds.tenths)

    Specifies the delay between screen updates, and overrides thecor-

    responding value in one's personal configuration file orthe

  • 8/3/2019 Comands Linux and Windows

    2/18

    startup default. Later this can be changed with the 'd' or's'

    interactive commands.

    Fractional seconds are honored, but a negative number isnot

    allowed. In all cases, however, such changes areprohibited if

    top is running in 'Secure mode', except for root (unless the's'command-line option was used). For additional

    information on'Secure mode' see topic 5a. SYSTEM Configuration File.

    -h : HelpShow library version and the usage prompt, then quit.

    -H : Threads toggleStarts top with the last remembered 'H' state reversed. When

    thistoggle is On, all individual threads will be displayed.

    Other-wise, top displays a summation of all threads in a process.

    -i : IdleProcesses toggle

    Starts top with the last remembered 'i' state reversed. Whenthistoggle is Off, tasks that are idled or zombied will not be

    dis-played.

    -n : Numberofiterations limit as: -nnumberSpecifies the maximum number of iterations, or frames, top

    shouldproduce before ending.

    -u : Monitorbyuser as: -usomebodyMonitor only processes with an effective UID or user name

    matchingthat given.

    -U : Monitorbyuser as: -Usomebody

    Monitor only processes with a UID or user name matchingthat

    given. This matches real, effective, saved, and filesystemUIDs.

    -p : MonitorPIDs as: -pN1-pN2... or -pN1,N2[,...]

    -S : Cumulativetimemode toggleStarts top with the last remembered 'S' state reversed.

    When'Cumulative mode' is On, each process is listed with the cpu

    timethat it and its dead children have used. See the 'S'

    interactivecommand for additional information regarding this mode.

    -v : Version

    Show library version and the usage prompt, then quit.

    -M : DetectmemoryunitsShow memory units (k/M/G) and display floating point values in

    thememory summary.

    Examplestop - 15:21:56 up 4:15, 2 users, load average: 0.17, 0.08, 0.06Tasks: 72 total, 2 running, 69 sleeping, 0 stopped, 1 zombieCpu(s): 4.3% us, 6.6% sy, 0.0% ni, 88.7% id, 0.0% wa, 0.3% hi, 0.0% siMem: 255464k total, 239784k used, 15680k free, 34000k buffersSwap: 497972k total, 37828k used, 460144k free, 119120k cached

  • 8/3/2019 Comands Linux and Windows

    3/18

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND3782 root 16 0 44012 20m 4584 R 6.7 8.2 14:09.68 X12487 user2 15 0 37404 11m 8520 S 2.0 4.7 0:02.34 gnome-terminal2667 root 15 0 15308 1660 1412 S 0.3 0.6 0:27.32 vmtoolsd

    >.cksumPrint CRC checksum and byte counts of each FILE.

    --h

    elp display this help and exit

    --versionoutput version information and exit

    syntaxcksum [FILE]...

    cksum [OPTION]

    Examples# cksum test.txt

    4038471504 75 test.txt

    >Free-mfree displays the total amount of free and used physical and swap memory in the system, as well as

    the buffers used by the kernel. The shared memory column should be ignored; it is obsolete

    syntax The -b switch displays the amount of memory in bytes; the -k switch (set by default) displays it inkilobytes; the -m switch displays it in megabytes.

    The -t switch displays a line containing the totals.

    The -o switch disables the display of a "buffer adjusted" line. If the -o option is notspecified, free subtracts buffer memory from the used memory and adds it to the freememoryreported.

    The -s switch activates continuous polling delayseconds apart. You may actually specify any floatingpoint number fordelay, usleep(3) is used for microsecond resolution delay times.

    The -l switch shows detailed low and high memory statistics.

    The -V switch displays version information

    Examples [user1@asp15 ~]$ free -mtotal used free shared buffers cached

    Mem: 269 235 10 0 36 118-/+ buffers/cache: 84 124Swap: 496 36 449

  • 8/3/2019 Comands Linux and Windows

    4/18

    >. crontabCrontab is the program used to install, deinstall or list the tables

    used to drive the cron(8) daemon in ISC Cron. Each user can havetheir

    own crontab, and though these are files in /var/spool/ , they arenot

    intended to be edited directly. For SELinux in mls mode can beeven

    more crontabs - for each range. For more see selinux(8).

    If the cron.allow file exists, then you must be listed therein inorder

    to be allowed to use this command. If the cron.allow file doesnot

    exist but the cron.deny file does exist, then you must not belisted in

    the cron.deny file in order to use this command. If neither ofthese

    files exists, only the super user will be allowed to use thiscommand.

    syntaxcrontab [-uuser] file

    crontab [-uuser] [-l | -r | -e] [-i] [-s]-u It specifies the name of the user whose crontab is to be

    tweaked. If this option is not given, crontab examines"your"

    crontab, i.e., the crontab of the person executing thecommand.

    Note that su(8) can confuse crontab and that if you arerunning

    inside of su(8) you should always use the -u option forsafety's

    sake. The first form of this command is used to install anew

    crontab from some named file or standard input if thepseudo-

    filename "-" is given.

    -l The current crontab will be displayed on standard output.

    -r The current crontab will be be removed.

    -e This option is used to edit the current crontab using theeditor

    specified by the VISUAL or EDITOR environment variables.After

    you exit from the editor, the modified crontab will beinstalled

    automatically.

    -i This option modifies the -r option to prompt the userfor a

    'y/Y' response before actually removing the crontab.

    -s It will append the current SELinux security context stringas an

    MLS_LEVEL setting to the crontab file before editing /replace-ment occurs - see the documentation of MLS_LEVEL in

    crontab(5).

  • 8/3/2019 Comands Linux and Windows

    5/18

    *Gestionarea proceselor

    >niceRun COMMAND with an adjusted niceness, which affects process schedul-

    ing. With no COMMAND, print the current niceness. Nicenessesrange

    from -20 (most favorable scheduling) to 19 (least favorable).

    -n, --adjustment=Nadd integer N to the niceness (default 10)

    --help display this help and exit

    --versionoutput version information and exit

    NOTE: your shell may have its own version of nice, which usuallysuper-

    sedes the version described here. Please refer to your shell'sdocu-

    mentation for details about the options it supports.

    syntaxnice [-n] prioritate comand argumente

    Examplesrenice +1 987

    va incrementa prioritatea procesului 987

    >reniceRenice alters the scheduling priority of one or more running processes. Thefollowing who parameters are interpreted as process ID's, process group ID's, or usernames.Renice'ing a process group causes all processes in the process group to have theirscheduling priority altered. Renice'ing a user causes all processes owned by the user to have theirscheduling priority altered. By default, the processes to be affected are specified by their processID's.

    syntaxOptions supported by renice:

    -g' Force who parameters to be interpreted as process groupID's.

    -u' Force the who parameters to be interpreted as user names.

    -p' Resets the who interpretation to be (the default) process ID's.

    Examplesrenice +1 987 -u daemon root -p 32

    would change the priority of process ID's 987 and 32, and all processes owned by users daemon androot.usage: renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]

    >ipcspcs provides information on the ipc facilities for which the calling process has read access.

    The -i option allows a specific resource idto be specified. Only information on this idwill be printed.

  • 8/3/2019 Comands Linux and Windows

    6/18

    syntaxResources may be specified as follows:

    -mshared memory segments

    -qmessage queues

    -ssemaphore arrays

    -aall (this is the default)

    The output format may be specified as follows:

    -ttime

    -ppid

    -ccreator

    -llimits

    -usummary

    >killThe command kill sends the specified signal to the specified process or process group. If no signal isspecified, the TERM signal is sent. The TERM signal will kill processes which do not catch this signal.For other processes, it may be necessary to use theKILL (9) signal, since this signal cannot becaught.

    Most modern shells have a builtin kill function, with a usage rather similar to that of the commanddescribed here. The '-a' and '-p' options, and the possibility to specify pids by command name is alocal extension.

    If sig is 0, then no signal is sent, but error checking is still performed.

    syntaxSpecify the list of processes that kill should signal. Each pidcan be one of five things:

    n

    where n is larger than 0. The process with pid n will be signaled.

    0

    All processes in the current process group are signaled.

    -1

    All processes with pid larger than 1 will be signaled.

    -n

    where n is larger than 1. All processes in process group n are signaled. When an argumentof the form '-n' is given, and it is meant to denote a process group, either the signal mustbe specified first, or the argument must be preceded by a '--' option, otherwise it will betaken as the signal to send.

    commandname

    All processes invoked using that name will be signaled.

  • 8/3/2019 Comands Linux and Windows

    7/18

    -ssignalSpecify the signal to send. The signal may be given as a signal name or number.

    -l

    Print a list of signal names. These are found in /usr/include/linux/signal.h

    -a

    Do not restrict the commandname-to-pid conversion to processes with the same uid as the presentprocess.

    -p

    Specify that kill should only print the process id (pid) of the named processes, and not send anysignals.

    Exampleskill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

    >psps displays information about a selection of the active processes. If you want a repetitive update ofthe selection and the displayed information, use top(1) instead

    syntaxExamples

    PID TTY TIME CMD

    2345 pts/0 00:00:00 bash

    2361 pts/0 00:00:00 ps

  • 8/3/2019 Comands Linux and Windows

    8/18

    *Gestionarea sistemelor de fiiere

    >Mount mount a filesystem

    syntaxThe standard form of the mount command, is

    mount-ttype device dirThis tells the kernel to attach the filesystem found on device (which is of type type) at thedirectory dir. The previous contents (if any) and owner and mode ofdirbecome invisible, and aslong as this filesystem remains mounted, the pathname dirrefers to the root of the filesystemon device.

    Examples[user1@asp15 ~]$ mount/dev/sda2 on / type reiserfs (rw)

    proc on /proc type proc (rw)none on /dev/pts type devpts (rw,gid=5,mode=620)

    >Umount unmount file systems

    syntaxOptions for the umount command:

    -V

    Print version and exit.-h

    Print help message and exit.-v

    Verbose mode.-n

    Unmount without writing in /etc/mtab.-r

    In case unmounting fails, try to remount read-only.-d

    In case the unmounted device was a loop device, also free this loop device.-i

    Don't call the /sbin/umount. helper even if it exists. By default/sbin/umount. helper is called if one exists.

    -aAll of the file systems described in /etc/mtab are unmounted. (With umount version 2.7and later: the procfilesystem is not unmounted.)

    Examples[user1@asp15 ~]$ umountUsage: umount [-hV]

    umount -a [-f] [ -r] [-n] [-v] [-t vfstypes] [-O opts]umount [-f] [-r] [-n] [-v] special | node...

    >M format add an MSDOS filesystem to a low-level formatted floppy disk

    syntaxIts syntax is:

    mformat [-t cylinders] [-h heads] [-s sectors][-f size] [-1] [-4] [-8][-v volume_label][-F] [-S sizecode] [-X][-2 sectors_on_track_0] [-3][-0 rate_on_track_0] [-A rate_on_other_tracks][-M software_sector_size][-N serial_number] [-a][-C] [-H hidden_sectors] [-I fsVersion][-r root_sectors] [-L fat_len][-B boot_sector] [-k][-m media_descriptor]drive:

    Examples[user1@asp15 ~]$ mformatMtools version 3.9.9, dated 3 March 2003

    Usage: mformat [-V] [-t tracks] [-h heads] [-n sectors] [-v label] [-1] [-4] [-8] [-f size] [-N serialnumber] [-k]

  • 8/3/2019 Comands Linux and Windows

    9/18

    [-B bootsector] [-r root_dir_len] [-L fat_len] [-F] [-I fsVersion] [-C] [-c cluster_size] [-H hidden_sectors] [-X][-S hardsectorsize] [-M softsectorsize] [-3] [-2 track0sectors] [-0 rate0] [ -A rateany] [-a]device

    >fdformat Low-level formats a floppy disk

    syntax -n

    Examples

    [user1@asp15 ~]$ fdformatusage: fdformat [ -n ] device

    >Df report file system disk space usage

    syntax -a, --all include dummy file systems-B, --block-size=SIZE

    use SIZE-byte blocks--direct

    show statistics for a file instead of mount point--total

    produce a grand total-h, --human-readable

    print sizes in human readable format (e.g., 1K 234M 2G)-H, --si

    likewise, but use powers of 1000 not 1024-i, --inodes

    list inode information instead of block usage-klike --block-size=1K

    -l, --locallimit listing to local file systems

    --no-syncdo not invoke sync before getting usage info (default)

    -P, --portabilityuse the POSIX output format

    --syncinvoke sync before getting usage info

    -t, --type=TYPElimit listing to file systems of type TYPE

    -T, --print-typeprint file system type

    -x, --exclude-type=TYPElimit listing to file systems not of type TYPE

    -v(ignored)

    --helpdisplay this help and exit

    --versionoutput version information and exit

    Examples[user1@asp15 ~]$ dfFilesystem 1K-blocks Used Available Use% Mounted on/dev/sda2 6835432 4382972 2452460 65% /

  • 8/3/2019 Comands Linux and Windows

    10/18

    WINDOWS COMANDS

    *Gestionarea memoriei

    COMANDA DESCRIERE EXEMPLE

    >defrag Defragment hard drive Microsoft Disk DefragmenterCopyright (c) 2007 Microsoft Corp.

    The parameter is incorrect. (0x80070057)

    Description:

    Locates and consolidates fragmentedfiles on local

    volumes to

    improve system performance.

    Syntax:

    defrag | /C | /E [/H] [/M |

    [/U] [/V]]

    defrag | /C | /E /A [/H] [/M

    | [/U] [/V]]

    defrag | /C | /E /X [/H] [/M

    | [/U] [/V]]

    defrag /T [/H] [/U] [/V]

    volumes.

    Examples:

    defrag C: /U /V

    defrag C: D: /Mdefrag C:\mountpoint /A /U

    defrag /C /H /V

    >TASKLIST Afiseaza informatia despreprocesele din memorie

    Image Name PID Session Name Session# Mem

    Usage

    ========================= ======== ================

    =========== ============

    System Idle Process 0 Services 0 24 K

    System 4 Services 0 972 K

    smss.exe 300 Services 0 624 K

    csrss.exe 440 Services 0 2.928 K

    wininit.exe 672 Services 0 2.456 K

    csrss.exe 696 Console 1 33.788 K

    services.exe 732 Services 0 7.664

    >driverquery

    Interogri pentru o list de

    drivere i proprietile driver-ului

    4147 user2 15 0 20512 5864 5096 S 0.3 2.3 0:00.98 gnome-

    session4220 user2 15 0 15380 7700 6220 S 0.3 3.0 0:27.18 metacity4222 user2 15 0 21216 6292 5472 S 0.3 2.5 0:06.85 gnome-settings-4230 user2 16 0 2268 1120 848 S 0.3 0.4 0:07.63 gam_server4286 user2 15 0 32480 7396 6872 S 0.3 2.9 0:00.72trashapplet4292 user2 15 0 34320 9168 6372 S 0.3 3.6 0:44.32 vmware-user-loa4299 user2 15 0 33680 8248 7408 S 0.3 3.2 0:22.40 clock-applet12682 user2 16 0 1932 964 776 R 0.3 0.4 0:00.29 top

  • 8/3/2019 Comands Linux and Windows

    11/18

    1 root 16 0 1580 476 448 S 0.0 0.2 0:01.22 init2 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0

    *Gestionarea proceselor

    > Schtasks ajusteaz pentru a executa comenzipe un program

    Folder: \

    TaskName Next Run Time Status

    ============================================================== ===============

    ATKOSD2 N/A Running

    GoogleUpdateTaskUserS-1-5-21-1886896689- 01.12.2011 07:38:00

    Ready

    GoogleUpdateTaskUserS-1-5-21-1886896689- 30.11.2011 16:38:00

    Ready

    {7018A930-2BA3-48CB-97AC-E756F9301AAE} N/A Ready

    Folder: \Microsoft

    TaskName Next Run Time Status

    ========================================

    ====================== ===============

    INFO: There are no scheduled tasks presently available at your

    access level.

    Folder: \Microsoft\Windows

    TaskName Next Run Time Status

    ========================================

    ====================== ===============

    INFO: There are no scheduled tasks presently available at your

    access level.

    Folder: \Microsoft\Windows\Active Directory Rights Management

    Services Client

    TaskName Next Run Time Status

    > tasklist afieaz informaii despre procesele defuncionare i de memorieImage Name PID Session Name Session# Mem

    Usage

    ========================= ======== ================

    =========== ============

    System Idle Process 0 Services 0 24 K

    System 4 Services 0 820 Ksmss.exe 308 Services 0 836 K

    csrss.exe 528 Services 0 3,408 K

    wininit.exe 620 Services 0 3,108 K

    csrss.exe 628 Console 1 9,012 K

    services.exe 676 Services 0 6,496 K

    lsass.exe 684 Services 0 8,252 K

    lsm.exe 692 Services 0 2,880 K

    winlogon.exe 816 Console 1 4,672 K

    svchost.exe 852 Services 0 7,744 K

    vsserv.exe 908 Services 0 18,320 K

    svchost.exe 960 Services 0 6,476 K

    atiesrxx.exe 1004 Services 0 2,928 K

    svchost.exe 1132 Services 0 14,600 K

    svchost.exe 1516 Services 0 61,352 K

    svchost.exe 1556 Services 0 31,500 K

    UMVPFSrv.exe 1596 Services 0 2,900 K

    svchost.exe 1808 Services 0 15,180 K

    atieclxx.exe 1912 Console 1 5,168 K

    svchost.exe 360 Services 0 12,456 K

    spoolsv.exe 2076 Services 0 9,348 K

    svchost.exe 2104 Services 0 9,776 K

    armsvc.exe 2224 Services 0 3,400 K

    Fuel.Service.exe 2268 Services 0 4,744 K

    IoctlSvc.exe 2332 Services 0 2,948 K

    safeboxservice.exe 2420 Services 0 16,264 K

    svchost.exe 2452 Services 0 4,436 K

  • 8/3/2019 Comands Linux and Windows

    12/18

    updatesrv.exe 2504 Services 0 8,436 K

    svchost.exe 3016 Services 0 4,708 K

    dwm.exe 3740 Console 1 34,704 K

    explorer.exe 3764 Console 1 54,888 K

    taskhost.exe 3856 Console 1 7,904 K

    bdagent.exe 3952 Console 1 3,424 K

    pchooklaunch32.exe 4040 Console 1 5,516 K

    RtHDVCpl.exe 3144 Console 1 12,604 K

    LWS.exe 3260 Console 1 12,568 K

    DTLite.exe 956 Console 1 12,952 K

    MOM.exe 1740 Console 1 5,468 K

    NMBgMonitor.exe 2428 Console 1 10,952 K

    NMIndexingService.exe 2960 Services 0 10,868 K

    svchost.exe 2968 Services 0 12,872 K

    NMIndexStoreSvr.exe 2808 Console 1 15,104 K

    CCC.exe 3320 Console 1 13,816 K

    SearchIndexer.exe 2592 Services 0 9,348 K

    wmpnetwk.exe 3696 Services 0 7,976 K

    svchost.exe 4188 Services 0 13,164 K

    sppsvc.exe 4476 Services 0 6,660 K

    PresentationFontCache.exe 4928 Services 0 9,956 K

    wuauclt.exe 5092 Console 1 5,528 K

    chrome.exe 4052 Console 1 97,096 K

    chrome.exe 3000 Console 1 44,736 Kchrome.exe 5112 Console 1 40,564 K

    chrome.exe 5332 Console 1 44,984 K

    OSPPSVC.EXE 5908 Services 0 11,392 K

    WINWORD.EXE 4988 Console 1 52,252 K

    OSE.EXE 1232 Services 0 7,308 K

    chrome.exe 5208 Console 1 26,524 K

    cmd.exe 3616 Console 1 3,368 K

    conhost.exe 4840 Console 1 5,384 K

    tasklist.exe 5380 Console 1 5,212 K

    WmiPrvSE.exe 5276 Services 0 5,732 K

    > Systeminfo Informatii despre sistem Host Name: ANDREI-PCOS Name: Microsoft Windows 7 Ultimate

    OS Version: 6.1.7601 Service Pack 1 Build 7601

    OS Manufacturer: Microsoft Corporation

    OS Configuration: Standalone WorkstationOS Build Type: MultiprocessorFree

    Registered Owner: Andrei

    Registered Organization:

    Product ID: 00436-OEM-8991652-00420

    Original Install Date: 05.08.2011, 12:24:05

    System Boot Time: 30.10.2011, 15:09:06

    System Manufacturer: ASUSTeK Computer Inc.

    >at Lansare de programe la un momentdat

    C:\Documents and Settings\Student>at 15:02 cmd/c copy

    c:\Documents\*.*c:\MyDoc

    Added a new job with job ID = 1

    *Gestionarea sistemelor de fiiere

    >compact Compress files or floders on anNTFS partitionListing C:\Users\Andrei\New files added to this directory will not be compressed.

    7263 : 7263 = 1,0 to 1 1.png4564 : 4564 = 1,0 to 1 2.png8286 : 8286 = 1,0 to 1 3(1).png6225 : 6225 = 1,0 to 1 3(2).png369 : 369 = 1,0 to 1 cipher.txt

    0 : 0 = 1,0 to 1 compact.txt0 : 0 = 1,0 to 1 Contacts0 : 0 = 1,0 to 1 Desktop 0 : 0 = 1,0 to 1 Music

  • 8/3/2019 Comands Linux and Windows

    13/18

    0 : 0 = 1,0 to 1 Pictures0 : 0 = 1,0 to 1 process comand0 : 0 = 1,0 to 1 Saved Games0 : 0 = 1,0 to 1 Searches

    5554 : 5554 = 1,0 to 1 Serials-7.txt0 : 0 = 1,0 to 1 Videos

    537365896 : 537365896 = 1,0 to 1 VMware-workstation-full-7.0.0-203739.exe

    Of 39 files within 1 directories0 are compressed and 39 are not compressed.541.920.161 total bytes of data are stored in 541.920.161 bytes.The compression ratio is 1,0 to 1.

    >defrag Defragment hard drive.Microsoft Disk DefragmenterCopyright (c) 2007 Microsoft Corp.

    The parameter is incorrect. (0x80070057)

    Description:

    Locates and consolidates fragmented files on localvolumes to

    improve system performance.

    Syntax:

    defrag | /C | /E [/H] [/M | [/U][/V]]

    defrag | /C | /E /A [/H] [/M | [/U][/V]]

    defrag | /C | /E /X [/H] [/M | [/U][/V]]

    defrag /T [/H] [/U] [/V]

    Parameters:

    Value Description

    /A Perform analysis on the specified volumes.

    /C Perform the operation on all volumes.

    /E Perform the operation on all volumes exceptthose specified.

    /H Run the operation at normal priority (default islow).

    /M Run the operation on each volume in parallelin the background.

    /T Track an operation already in progress on thespecified volume.

    /U Print the progress of the operation on thescreen.

    /V Print verbose output containing thefragmentation statistics.

    /X Perform free space consolidation on thespecified volumes.

    Examples:

    defrag C: /U /Vdefrag C: D: /Mdefrag C:\mountpoint /A /Udefrag /C /H /V

  • 8/3/2019 Comands Linux and Windows

    14/18

    >chiperEncrypt or Decrypt files and folders.

    Without parameters cipher will

    display the encryption state of the

    current folder and files.

    NTFS volumes only./e Encrypt the folders.

    Folders are markedso that files that are

    added to the folder laterare encrypted too.

    /d Decrypt thefolders.

    Folders are markedso that files that areadded to the folder later

    are encrypted too.

    /s:FolderPerforms the

    operation in the folder andall subfolders.

    /a Perform theoperation for files and

    directories.

    /i Continue evenafter errors occur.

    By default, cipherstops when it encounters anerror.

    /f Force theencryption or decryption ofall specified objects.

    By default, cipherskips files that have beenencrypted or decryptedalready.

    /q Quiet - Report

    only essential information.

    /h Display files withhidden or systemattributes.

    By default, thesefiles are not encrypted ordecrypted.

    /k Create a new fileencryption key for the userrunning cipher.

    /u Update the user'sfile encryption key orrecovery agent's key

    to the current

    ones in all of theencrypted files on localdrives

    (that is, if thekeys have been changed).

    This option onlyworks with /n.

    /n Prevent keys frombeing updated.

    Use this option tofind all of the encryptedfiles on the local drives.

    Listing C:\Users\Andrei\New files added to this directory will not be encrypted.

    U 1.pngU 2.pngU 3(1).pngU 3(2).pngU cipher.txt

    U ContactsU DesktopU DocumentsU DownloadsU FavoritesU LinksU Memory comandU MusicU PicturesU process comandU Saved GamesU SearchesU Serials-7.txtU VideosU VMware-workstation-full-7.0.0-203739.exe

  • 8/3/2019 Comands Linux and Windows

    15/18

    This option onlyworks with /u.

    >chkdskCheck Disk - check andrepair disk problems

    Microsoft Windows [Version 6.1.7601]

    (c) 2009 MicrosoftCorporation. Toate drepturil

    C:\Windows\system32>chkdsk

    The type of the file system is NTFS.

    WARNING! F parameter not specified.

    Running CHKDSK in read-only mode.

    CHKDSK is verifying files (stage 1 of 3)...

    133632 file records processed.

    File verification completed.

    162 large file records processed.

    0 bad file records processed.

    2 EA records processed.

    44 reparse records processed.

    CHKDSK is verifying indexes (stage 2 of 3)...

    170430 index entries processed.

    Index verification completed.

    0 unindexed files scanned.

    0 unindexed files recovered.

    CHKDSK is verifying security descriptors (stage133632 file SDs/SIDs processed.

    Security descriptor verification completed.

    18400 data files processed.

    CHKDSK is verifying Usn Journal...

    37020680 USN bytes processed.

    Usn Journal verification completed.

    Windows has checked the file system and found n

    51199123 KB total disk space.

    31942696 KB in 75694 files.

    46576 KB in 18401 indexes.

    0 KB in bad sectors.

    238215 KB in use by the system.

    65536 KB occupied by the log file.

    18971636 KB available on disk.

    4096 bytes in each allocation unit.

    12799780 total allocation units on disk.

    4742909 allocation units available on disk.

    C:\Windows\system32>

    *Comenzi comune Linux si Windows

    >findSearch for a text string in a file & display allthe lines where it is found.

    linux@linux:~>find

    .

    ./.xim.template

    ./Pictures

    ./Pictures/Screenshot at 2011-12-04 15:53:25.png

    Windows

    >Help

    Prezinta informaia despre comenzi C:\Users\Andrei>help

    For more information on a specific command, type HELPcommand-name

    ASSOC Displays or modifies file extension associations.

    ATTRIB Displays or changes file attributes.

    BREAK Sets or clears extended CTRL+C checking.

    BCDEDIT Sets properties in boot database to control boot

    loading.

    CACLS Displays or modifies access control lists (ACLs) of

    files.

    CALL Calls one batch program from another.

    CD Displays the name of or changes the current directory.

    CHCP Displays or sets the active code page number.

  • 8/3/2019 Comands Linux and Windows

    16/18

    CHDIR Displays the name of or changes the current

    directory.

    CHKDSK Checks a disk and displays a status report.

    CHKNTFS Displays or modifies the checking of disk at boot

    time.

    CLS Clears the screen.

    CMD Starts a new instance of the Windows command

    interpreter.

    COLOR Sets the default console foreground and backgroundcolors.

    COMP Compares the contents of two files or sets of files.

    COMPACT Displays or alters the compression of files on NTFS

    partitions.

    CONVERT Converts FAT volumes to NTFS. You cannot

    convert the

    current drive.

    COPY Copies one or more files to another location.

    DATE Displays or sets the date.

    DEL Deletes one or more files.

    DIR Displays a list of files and subdirectories in a directory.

    DISKCOMP Compares the contents of two floppy disks.

    DISKCOPY Copies the contents of one floppy disk to another.

    DISKPART Displays or configures Disk Partition properties.

    DOSKEY Edits command lines, recalls Windows commands,

    and creates macros.

    DRIVERQUERY Displays current device driver status and

    properties.

    ECHO Displays messages, or turns command echoing on or

    off.

    ENDLOCAL Ends localization of environment changes in a

    batch file.

    ERASE Deletes one or more files.

    EXIT Quits the CMD.EXE program (command interpreter).

    FC Compares two files or sets of files, and displays the

    differences between them.

    FIND Searches for a text string in a file or files.

    FINDSTR Searches for strings in files.

    FOR Runs a specified command for each f ile in a set of files.

    FORMAT Formats a disk for use with Windows.

    FSUTIL Displays or configures the file system properties.

    FTYPE Displays or modifies file types used in file extension

    associations.

    GOTO Directs the Windows command interpreter to a

    labeled line in

    a batch program.

    GPRESULT Displays Group Policy information for machine or

    user.

    GRAFTABL Enables Windows to display an extended

    character set in

    graphics mode.

    HELP ProvidesHelp information for Windows commands.

    ICACLS Display, modify, backup, or restore ACLs for files and

    directories.

    IF Performs conditional processing in batch programs.

    LABEL Creates, changes, or deletes the volume label of a

    disk.

    MD Creates a directory.MKDIR Creates a directory.

    MKLINK Creates Symbolic Links and Hard Links

    MODE Configures a system device.

    MORE Displays output one screen at a time.

    MOVE Moves one or more files from one directory to

    another

    directory.

    OPENFILES Displays files opened by remote users for a file

    share.

    PATH Displays or sets a search path for executable files.

  • 8/3/2019 Comands Linux and Windows

    17/18

    PAUSE Suspends processing of a batch file and displays a

    message.

    POPD Restores the previous value of the current directory

    saved by

    PUSHD.

    PRINT Prints a text file.

    PROMPT Changes the Windows command prompt.

    PUSHD Saves the current directory then changes it.

    RD Removes a directory.RECOVER Recovers readable information from a bad or

    defective disk.

    REM Records comments (remarks) in batch files or

    CONFIG.SYS.

    REN Renames a file or files.

    RENAME Renames a file or files.

    REPLACE Replaces files.

    RMDIR Removes a directory.

    ROBOCOPY Advanced utility to copy files and directory trees

    SET Displays, sets, or removes Windows environment

    variables.

    SETLOCAL Begins localization of environment changes in a

    batch file.

    SC Displays or configures services (background processes).

    SCHTASKS Schedules commands and programs to run on a

    computer.SHIFT Shifts the position of replaceable parameters in batch

    files.

    SHUTDOWN Allows proper local or remote shutdown of

    machine.

    SORT Sorts input.

    START Starts a separate window to run a specified program

    or command.

    SUBST Associates a path with a drive letter.

    SYSTEMINFO Displays machine specific properties and

    configuration.

    TASKLIST Displays all currently running tasks including

    services.

    TASKKILL Kill or stop a running process or application.

    TIME Displays or sets the system time.

    TITLE Sets the window title for a CMD.EXE session.

    TREE Graphically displays the directory structure of a drive

    or

    path.

    TYPE Displays the contents of a text file.

    VER Displays the Windows version.

    VERIFY Tells Windows whether to verify that your files are

    written

    correctly to a disk.

    VOL Displays a disk volume label and serial number.

    XCOPY Copies files and directory trees.

    WMIC Displays WMI information inside interactive

    command shell.

    For more information on tools see the command-line reference in

    the online help.

    C:\Users\andreiman>

    >Date Display or change the datelinux@linux:~>date

    Sun Dec 4 16:14:44 UTC 2011

    Windows

    The current date is: 04.12.2011

    Enter the new date: (dd-mm-yy)

  • 8/3/2019 Comands Linux and Windows

    18/18