Miscellaneous
  Home arrow Miscellaneous arrow Page 4 - UNIX File Systems
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS

UNIX File Systems
By: Gabor Bernat
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2009-03-18

    Table of Contents:
  • UNIX File Systems
  • File Types
  • The File System and Important Directories
  • Working with Directories and Files
  • Devices

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    UNIX File Systems - Working with Directories and Files


    (Page 4 of 5 )

    For creating directories, we use the mkdir and the rmdir commands. This is going to be followed by the argument for the new file name or the directory we want to delete.

    #create a directory in the current working directory

    mkdir alfa

     

    #removes directory alfa what has no items inside.

    rmdir alfa

    You can move the working directory with the cd command.

    #move up a level

    cd ..

     

    #move into directory alfa what you will find in the working

    #directory

    cd alfa

     

    #move into the alfa directory found a level up to the home dir

    cd ~/../alfa

    We can create files with the touch command. This will either just update the last modification status if the file is already created, or create it if it does not exist. The files inside UNIX are just a stream of bytes. They can be binary files and text file. You can also read the text files.

    #create a file into the current working directory

    touch omega

    Further tasks include copy (cp), remove (rv), move or rename files/directories(mv).

    #copy [what] [where] => copy alfa file into beta directory

    cp alfa ~/beta

     

    #rm [what file] =>Remove alfa file from the working directory

    rm alfa

    These commands will not return any message if everything goes correctly. We can get information about a file with the already-presented ls command; to review this command, see my article about the terminal and the commands file and stat. Just enter the name of a file as an argument with its route, and you will see what information this offers.

    The text files are the most used, as most of the programs communicate in this manner with the user. The end of line character is only the 10 ASCI code character (n). This is as opposed to Windows, where this is followed by a carriage return (r).

    Files can be of zero length (empty files) and up to 2 GB on 32-bit operating systems, and up to eight billion GB on the 64-bit ones. To just give an idea of the size of eight billion GB let me tell you that a hard drive with current technology writing a file of this size would take several thousand years.

    More Miscellaneous Articles
    More By Gabor Bernat


       · Good article; clear, simple, kind of beautiful!One error: In section 4, "Working...
       · Why do you say that Windows NT is object-based filesystem, and NOT hierarchical like...
     

    MISCELLANEOUS ARTICLES

    - Using PHP to Stream MP3 Files and Prevent Il...
    - 10 Must Have Firefox Improvements
    - All About OpenOffice 3.0
    - Shell Script Writing
    - Loops in the UNIX Shell
    - The Test in the UNIX Shell
    - Data Streams and the UNIX Shell
    - Control Mechanisms of the UNIX Shell
    - Variables Within the UNIX Shell
    - The Shell and UNIX
    - In Detail: UNIX File Systems
    - Rights Management in UNIX
    - UNIX File Systems
    - The Terminal in UNIX
    - Operating Systems and UNIX





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek