Skip to content

Terminal

Some Useful Console Commands :

  • grep "some string" file\ The grep command searches for patterns in each file. It also looks for patterns separated by newline characters, and grep prints each line that matches a pattern.
  • pwd\ The pwd command is a command-line utility for printing the current working directory.
  • touch somefile\ The touch command is used to create a file without any content. The touch command can be used when the user doesn’t have data to store at the time of file creation.
  • $ rm someFile\ Rm stands for remove, which does exactly what it says it does. Removes, or in other words, deletes a file rm -rf some-directory\ By default, the rm command doesn’t remove directories. You need to pass the -rf flag to remove directories.
  • rmdir some-directory The rmdir command removes the directory if there’s no content inside the directory.
  • find path -name filename\ The find command lets you quickly lookup a file or directory. It’s useful when you’re working on a big project with hundreds of files and multiple directories.
  • mv somefile /to/some/other/path\ The mv command moves files or directories from one place to another. The mv command supports moving single files, multiple files, and directories.