Posted in linux command

Some Linux commands

  • ls –> list what within current directory
  • pwd  –> output current working directory
  • mkdir –> create a new directory
  • touch –> create a new file
  • cp –> copy file
  • mv –> move/rename file
  • rm –> remove file/directory(-r)
  • cat –> view content of a file (cat … > … : replace; cat … >> … : append)
  • uniq –> filter out duplicate lines in a file
  • grep –> search file for line that matches a pattern and return the results (-i : case insensitive)
  • grep -R –> search all files in a directory and output filenames with matched result
  • sed –> searches for a text pattern, modifies it, and outputs it
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s