linux

All posts tagged linux

Moving between OS types can be a pain. How many times have you typed ls into a windows machine when trying to list the files in a directory? This is a handy dandy guide comparing commands between the two.

It will be updated over time as we get requests or as we feel it is justified.

Linux

Windows

lsdir
Both ls and dir list the contents of a directory
Pwdecho %cd%
Print the current directory
Whowhoami
Print the current user
cat <filename>type <filename>
Print the contents of a file to the screen
> and >>> and >>
Send the contents of cat or type to another file. > overwrites the target file >> appends to the end of file
Strings[none]
Prints human readable content from binary filesSysInternals has a downloadable Windows equivalent
cronAt
Schedule tasks to run at a specific time
ps auxtasklist /v
Print the list of running tasks
grep <search string>find
Search for a pattern in a file
| – (SHIFT + \ usually)|
Send the output of one command as the input to the next command
ifconfigiwconfigIpconfig
Print network settings. iwconfig prints wireless network settings in linux.
hostnameHostname
Print the computer name

 

Pipe usage:

Command1 | Command2

Search a file for a string in Linux:

cat samplefile.txt | grep secret

Search a file for a string in Windows:

type samplefile.txt | find /I secret

 /I ignores the case of the search string