eSolia PROdb

List All

アクションSectionActionLinux CmdMac CmdDOS CmdComments
表示Entering CommandsGet command help.man <some command>help, command /?

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

表示Entering CommandsFind related commands.apropos <some search string>

No DOS equivalent.

表示Entering CommandsFlip through entered commands.Arrows ^ and vArrows ^ and v
表示Entering CommandsShow command history.historydoskey /h
表示Entering CommandsSet a command alias.alias name=commanddoskey name=command

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

表示Entering CommandsClear the screen.clear, ctrl-lcls
表示Entering CommandsTrap ctrl-break or trap signals.trapbreak on
表示Starting and QuittingStart Windows or X-Windows.startxwin
表示Starting and QuittingReboot system.shutdown -r nowreboot
表示Starting and QuittingExit the shell.exit, exit 0exit, exit0
表示Starting and QuittingGet operating system or shell version.uname -a, cat /etc/issuever
表示Working with DisksCheck and repair drive file system.fsck, debugfsscandisk, defrag
表示Working with DisksShow disk usage.du -schdisk
表示Working with DisksTool to partition a hard drive.fdiskfdisk
表示Working with DisksMount a drive letter to a folder/directory on your hard drive.mountsubst X: C:\directory\path
表示Working with DisksFormat a drive file system.mke2fsformat
表示Setting the EnvironmentList environment variables.set, envset
表示Setting the EnvironmentSet an environment variable.export variable=value, setenv, or variable=valueset variable=value
表示Setting the EnvironmentShow the contents of an environment variable.echo $variableecho %variable%
表示Setting the EnvironmentDisplay text on screen.echo textecho text
表示Setting the EnvironmentDisplay the system search path.echo $PATHPATH
表示Setting the EnvironmentAppend 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.

表示Setting the EnvironmentSet 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.

表示Getting System InfoShow and set the system date and time.datedate, time
表示Getting System InfoShow free memory on system.free, topmem
表示Getting System InfoList information about running processes.ps -auxtasklist
表示Getting System InfoPrint computer's name.hostnamehostname, net name

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

表示Getting System InfoShow system info.lsdev, procinfosystem_profilermsd

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

表示Working with Files and DirectoriesChange directory.cdcdcd
表示Working with Files and DirectoriesStore directories for reference.cd -, pushd /path/to/target, popdpushd, popd

Pushd and popd are available for newer Windows versions.

表示Working with Files and DirectoriesList directory contents with some detail.ls -l (or use ls -lF)(-a all files)dir

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

表示Working with Files and DirectoriesList directory contents in compact mode.lsdir /w
表示Working with Files and DirectoriesList directory contents, oldest files first.ls -trdir *.* /o-d
表示Working with Files and DirectoriesList files and size.ls -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.

表示Working with Files and DirectoriesList 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.

表示Working with Files and DirectoriesList directory contents recursively.ls -Rdir /s
表示Working with Files and DirectoriesList including hidden files.ls -adir /aa
表示Working with Files and DirectoriesCreate 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

表示Working with Files and DirectoriesMake a new directory.mkdirmkdir, md
表示Working with Files and DirectoriesCreate a file or directory link.ln(assign, subst)

Neither assign nor subst are really much like ln.

表示Working with Files and DirectoriesRemove a directory.rmdirrmdir, rd
表示Working with Files and DirectoriesDisplay current location.pwdchdir
表示Working with Files and DirectoriesRemove a file.rm -ivdel, erase, rmdir /s
表示Working with Files and DirectoriesRemove directory and its contents.rm -Rdeltree

Deltree is Win 95.

表示Working with Files and DirectoriesCopy a file.cp -pivcopy

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

表示Working with Files and DirectoriesCopy a directory and all its subcontents.cp -Rxcopy
表示Working with Files and DirectoriesRename or move a file.mv -ivrename, move
表示Working with Files and DirectoriesShow the contents of a file.cattype
表示Working with Files and DirectoriesShow the contents of a file, one page at a time.moremore
表示Working with Files and DirectoriesSort data alphabetically or numerically.sortsort
表示Working with Files and DirectoriesFind a string in a file.grepfind, findstr
表示Working with Files and DirectoriesCompare two files and show differences. Also see comm, cmp, mgdiff and tkdiff.diffcomp, fc
表示Working with Files and DirectoriesSet or change file permissions.chmodattrib

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

表示Working with Files and DirectoriesPrint a file.lprprint
表示Working with Files and DirectoriesLine mode editorededlin
表示Working with Files and DirectoriesEdit 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.

表示Backup and RestoreBackup or Restore files.tar -cvf, tar -xvf, mdir, mcopy, ditto, cpiobackup, restore
表示Backup and RestoreBackup files to a folder.tar -cvf /path/to/storage filesbackup files X:\
表示Backup and RestoreRestore files from a folder.tar -xvf /path/to/storage filesrestore X:\ files
表示Backup and RestoreCompress or uncompress files and folders.tar, zip, gzip, bzippkzip

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

表示Batch and Shell ScriptingCall another script from within a batch file or shell script.source somescript, . somescript, sh somescriptcall command /c (or cmd) somescript
表示SchedulingSchedule a command or script to run on a schedule.crontab -l, crontab -eat
表示Network CommandsSend icmp packets to a network host.pingping
表示Network CommandsShow routes and router hops to given network destination.traceroutetracert
表示Network CommandsDisplay 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.

表示Network CommandsGet netbios or dns info for the host.nslookup, dignbtstat

NetBIOS is a Windows and DOS affair.

表示Network CommandsPrint the current routing table.route -nroute print
表示Network CommandsList startup background services or daemons.chkconfig --list |grep onnet start
表示Network CommandsStart & Stop Servicesservice some-service start|stopnet start|stop some-service
表示Network CommandsShow mounted or connected shares and filesystems.dfnet share, net use
表示CommunicationsSend a messenger popup message to a Windows PC.smbclient -M win-hostnamenet send win-hostname "some message"
表示CommunicationsSend message to another *nix user.talk
表示Working with UsersList who is logged in.who
表示Working with UsersList how many users are currently logged in.who | wc -l
表示Working with UsersShow 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.

表示Working with UsersShow who is logged in and what they are doing.wnet session
表示Working with UsersShow a list of a user's processes.ps -u account_name(Task Manager)
表示Network CommandsClear DNS Cache/etc/rc.d/init.d/nscd restartdscacheutil -flushcache OR sudo killall -HUP mDNSResponderipconfig /flushdns

Older OS X Leopard was "lookupd -flushcache".

表示Working with ApplicationsOpen applications from the command line.xdg-open, mimeopen, seeopenstart "", explorer.exe, (enter filename)

79 件の記事を表示しています。