eSolia PROdb

List CLI Equivalents

IdActionLinux CmdMac CmdDOS CmdComments
Backup and Restore   4 件の記事
60Compress or uncompress files and folders.tar, zip, gzip, bzippkzip

Note, tar just concatenates files together for easy manipulation, and is often used before compression.

59Restore files from a folder.tar -xvf /path/to/storage filesrestore X:\ files
58Backup files to a folder.tar -cvf /path/to/storage filesbackup files X:\
57Backup or Restore files.tar -cvf, tar -xvf, mdir, mcopy, ditto, cpiobackup, restore
Batch and Shell Scripting   1 件の記事
61Call another script from within a batch file or shell script.source somescript, . somescript, sh somescriptcall command /c (or cmd) somescript
Communications   2 件の記事
72Send message to another *nix
71Send a messenger popup message to a Windows PC.smbclient -M win-hostnamenet send win-hostname "some message"
Entering Commands   7 件の記事
7Trap ctrl-break or trap signals.trapbreak on
6Clear the screen.clear, ctrl-lcls
5Set a command alias.alias name=commanddoskey name=command

Use ~/.bashrc to set permanently in *nix.

4Show command history.historydoskey /h
3Flip through entered commands.Arrows ^ and vArrows ^ and v
2Find related commands.apropos <some search string>

No DOS equivalent.

1Get command <some command>help, command /?

man system is well-developed and most apps have a man file.

Getting System Info   5 件の記事
28Show system info.lsdev, procinfosystem_profilermsd

Lsdev and procinfo do not work on Linux VPSs sometimes due to the way disks are provisioned.

27Print computer's name.hostnamehostname, net name

hostname is DNS-related, whereas the Windows net name command shows netbios info.

26List information about running -auxtasklist
25Show free memory on, topmem
24Show and set the system date and time.datedate, time
Network Commands   9 件の記事
78Clear DNS Cache/etc/rc.d/init.d/nscd restartdscacheutil -flushcache OR sudo killall -HUP mDNSResponderipconfig /flushdns

Older OS X Leopard was "lookupd -flushcache".

69Start & Stop Servicesservice some-service start|stopnet start|stop some-service
70Show mounted or connected shares and filesystems.dfnet share, net use
68List startup background services or daemons.chkconfig --list |grep onnet start
67Print the current routing table.route -nroute print
66Get netbios or dns info for the host.nslookup, dignbtstat

NetBIOS is a Windows and DOS affair.

65Display or configure network interfaces.ifconfigipconfig, winipcfg

You cannot configure the network from the command line in Windows, like you can with ifconfig in *nix. Use Control Panel.

64Show routes and router hops to given network destination.traceroutetracert
63Send icmp packets to a network host.pingping
Scheduling   1 件の記事
62Schedule a command or script to run on a schedule.crontab -l, crontab -eat
Setting the Environment   7 件の記事
23Set the style of the command prompt.export PS1='\h(\u)\W> 'PROMPT $p$g

Much more complexity is possible in both flavors of OS, here.

22Append a directory to the system search path.PATH=$PATH:/dirPATH %PATH%;C:\DIR

Setting the path allows you to run commands without thinking about where their executable file is.

21Display the system search path.echo $PATHPATH
20Display text on screen.echo textecho text
19Show the contents of an environment variable.echo $variableecho %variable%
18Set an environment variable.export variable=value, setenv, or variable=valueset variable=value
17List environment variables.set, envset
Starting and Quitting   4 件の記事
11Get operating system or shell version.uname -a, cat /etc/issuever
10Exit the shell.exit, exit 0exit, exit0
9Reboot system.shutdown -r nowreboot
8Start Windows or X-Windows.startxwin
Working with Applications   1 件の記事
79Open applications from the command line.xdg-open, mimeopen, seeopenstart "", explorer.exe, (enter filename)
Working with Disks   5 件の記事
16Format a drive file system.mke2fsformat
15Mount a drive letter to a folder/directory on your hard drive.mountsubst X: C:\directory\path
14Tool to partition a hard drive.fdiskfdisk
13Show disk usage.du -schdisk
12Check and repair drive file system.fsck, debugfsscandisk, defrag
Working with Files and Directories   28 件の記事
29Change directory.cdcdcd
56Edit a text file.[editor] filename - where editor can be nano, pico, vi, emacs etc.edit filename.txt

In *nix, editors are a religion because the are used so heavily for systems administration tasks. Pico was the editor that came with the Pine mailer, and nano is a standalone pico variant. Many swear by simple vi or complex emacs, though.

55Line mode editorededlin
54Print a file.lprprint
53Set or change file permissions.chmodattrib

DOS has hidden switch; use mv to .somename to make a file hidden in *nix.

52Compare two files and show differences. Also see comm, cmp, mgdiff and tkdiff.diffcomp, fc
51Find a string in a file.grepfind, findstr
50Sort data alphabetically or numerically.sortsort
49Show the contents of a file, one page at a time.moremore
48Show the contents of a file.cattype
47Rename or move a -ivrename, move
46Copy a directory and all its subcontents.cp -Rxcopy
45Copy a file.cp -pivcopy

Of course you can just cp a file in Linux, as well.

44Remove directory and its contents.rm -Rdeltree

Deltree is Win 95.

43Remove a file.rm -ivdel, erase, rmdir /s
42Display current location.pwdchdir
41Remove a directory.rmdirrmdir, rd
40Create a file or directory link.ln(assign, subst)

Neither assign nor subst are really much like ln.

39Make a new directory.mkdirmkdir, md
38Create a semi-graphical "tree" view of folders and sub-folders.treetree

Use tree with more to get page-by-page output, and space-bar through the pages. I.e.: $ tree | more

37List including hidden -adir /aa
36List directory contents -Rdir /s
35List size of directory contents.du -h | sort -rn, du -hsc * --block-size=M(treesize)

Du or diskusage is common, but the switches will be different so do a "man du" to find out more in your *nix. Treesize is an excellent GUI version of du for Windows.

34List files and -lsdir *.* /v /os

Notice you are stringing together args in Linux after the dash, but that you have to put in additional slashes and args in DOS.

33List directory contents, oldest files -trdir *.* /o-d
32List directory contents in compact mode.lsdir /w
31List directory contents with some -l (or use ls -lF)(-a all files)dir

The "bare" directory list commands are inherently different in display characteristics.

30Store directories for -, pushd /path/to/target, popdpushd, popd

Pushd and popd are available for newer Windows versions.

Working with Users   5 件の記事
73List who is logged in.who
77Show a list of a user's -u account_name(Task Manager)
76Show who is logged in and what they are doing.wnet session
75Show the current user account.whoamiset

There is a whoami command for Windows available in the Resource Kit. Or, you can use set to list the environment variables, of which the username is one.

74List how many users are currently logged in.who | wc -l
79 件の記事を表示しています。