UNIX COMMANDS


  • pwd:print working directory displays the name of the current directory.
  • cd:change directory command will change the current directory to the directory specified as the argument to the command.
  • ls:list files command displays the files in a directory .
  • ls-l:long list option for listing files displays permissions, links, owner, group, file size, modification date,file name.
  • rm:remove command deletes ordinary files in a directory.
  • mv:move commands moves a file from one location to another.It is also used to rename files,as in mv thisfile.txt thatfile.txt
  • cp:copy command creates a copy of a file.
  • chmod: change mode command is used to control access rights to a file or files.
  • mkdir: make directory command creates a directory or sub directory within the current directory .
  • rmdir: remove directory command  removes a directory or sub directory. The specified directory must be empty before it can be removed.
  • find:find command is used to locate files.
  • file: file command is used to determine the type of information in the file listed as the argument to the command, i.e..,text or binary.
  • cat:cat command displays the content of files,.It is also used to concatenate files as in "cat file1.txt file2.txt file3.txt>allfiles.txt".
  • wc: wc command displays a count of characters, words, and lines in a text file.
  • sort:sort command is used to sort and/or merge text files.
  • grep:grep commands searches for text strings in files.
  • who:tells whos logged on.
  • finger username:gives you lots of information about that user.
  • diff filename1 filename2: compares  files, and shows where they differ.
  • cp filename1 filename2: copies a file.
  • mv filename1 filename2: moves a file.
  • date: shows the current date and time.
  • cal: shows a calender of the current month.use eg..,cal 10 2012, to get that for October 12, or cal 2012 to get the whole year.
  • tail:used to display the last few lines of a file.
  • head-lines file name:to display the first few lines of a file.
  • cat file1 >>file2: append more than one file.

Related Posts by Categories

0 comments:

Post a Comment