Miscellaneous

  Home arrow Miscellaneous arrow Page 4 - UNIX File Systems
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

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    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

    blog comments powered by Disqus

    MISCELLANEOUS ARTICLES

    - Oracle Database XE: Indexes and Sequences
    - Modifying Tables in Oracle Database XE
    - Oracle Database XE: Tables and Constraints
    - More on Oracle Databases and Datatypes
    - Oracle Database XE Datatypes: Datetime and L...
    - Oracle Database XE Datatypes: Character and ...
    - From Databases to Datatypes
    - Firefox 3.6.6 Released with Improved Plug-in...
    - Attention Bloggers: WordPress 3.0 Now Releas...
    - Reflection in PHP 5
    - Inheritance and Other Advanced OOP Features
    - Advanced OOP Features
    - Linux from Scratch V.6.6 Review
    - Linux Gaining in Strength
    - Install Slackware on Your Old PC


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 11 - Follow our Sitemap