Skip to content

endormi/equivalent-commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Equivalent-Commands

UNIX-based and windows system equivalent commands.

I will be adding many more commands.

NOTE: I'm mainly focusing on command prompt on windows.

UNIX

cat command
  :: `cat` command is `type` on windows.

  type file.txt
grep command
  :: `grep` command is `findstr` (Command Prompt) on windows.

  findstr "foo"
  # `grep` command is `Select-String` (PowerShell) on windows.

  Select-String "foo"
less command
  :: `less` command is equivalent to `more` command on windows, but `less` is more powerful.
  :: you can install `less` on windows, but `more` is on by default.

  more
clear command
  :: `clear` command is `cls` command on windows.
  :: `clear` command works on PowerShell as well.

  cls
ls command
  :: `ls` command is `dir` command on windows.
  :: `ls` command works on PowerShell as well.

  dir
rm command
  :: `rm` command is `del` command on windows.
  :: `rm` command works on PowerShell as well.

  del file.txt
touch command
  :: `touch` command is `copy nul` or `type nul` command on windows.

  type nul >> "file.txt"
  :: Does not work on PowerShell.

  copy nul "file.txt"
which command
  :: `which` command is `where` on windows.

  where git

Windows

type command
  # `type` command is `cat` on UNIX.

  cat file.txt
findstr command (Command Prompt) or Select-String command (PowerShell)
  # `findstr` and `Select-String` command is grep on UNIX.

  grep "foo"
more command
  # `more` command is equivalent to `less` command on UNIX, but it's not as powerful.
  # you can install `less` on windows.

  less
cls command
  # `cls` command is `clear` command on UNIX.
  # `clear` command works on PowerShell as well.

  clear
dir command
  # `dir` command is `ls` command on UNIX.

  ls
del command
  # `del` command is `rm` command on UNIX.

  rm file.txt
copy nul and type nul command
  # `copy nul` or `type nul` command is `touch` command on UNIX.

  touch file.txt
where command
  # `where` command is `which` on UNIX.

  which git