Techknow Study

UNIX : Directory and File commands

5:43:00 PM Ashish Rana 0 Comments Category :

  • bdf : display disk space (HP-UX).
  • cat filename : display the content of file filename
  • cd dirname : change directory to dirname. If dirname is omitted, change to your home directory.
  • cp source destination : copy file source into file destination.
  • df dirname ; display free disk space. If dirname is omitted, display all available disks. The output maybe in blocks or in Kbytes.
  • dtree : visually display directory structure
  • less filenamedisplay filename one screenful. A pager similar to (better than) more.
  • ls : list the content of directory
    -a display hidden files
    -l display in long format
  • mkdir dirnamemake directory dirname
  • more filenameview file filename one screenfull at a time
  • mv oldname newnamerename file oldname to file newname. If newname is a directory, then move oldname into directory newname.
  • pg filenameview filename one screenfull at atime (a pager).
  • pwd : present working directory (or print working directory)
  • rmdir dirnameremove directory dirname (if dirname is empty).
  • rm file1 [file2 ...]remove files file1, file2, etc.
  • rm -r dirnameremove dirname recursively, removing all files and subdirectories underneath dirname.
  • xless : an X window pager (named after less)