zbeng Posted May 28, 2006 Report Share Posted May 28, 2006 <p class=MsoNormal>The Linux File system isn’t to hard to learn,it isn’t assimple as Windows, but if you plan on running Linux you should knowwhere yourfiles are. This paper is for users new to Linux, experienced peoplemost likelywont learn too much from this paper. </p><p class=MsoNormal>The Root Directory</p><p class=MsoNormal>The file system can be thought of as a sortof tree, thetrunk or start of this tree is the root directory which isrepresented by aforward slash ‘/’. All the other directories branch off from thisone.</p><p class=MsoNormal><o:p></o:p></p><p class=MsoNormal>Common Subdirectories of the Root</p><p class=MsoNormal>/bin – Common programs, often binaryfiles</p><p class=MsoNormal>/boot – Files for booting the system, thisis where thekernel is</p><p class=MsoNormal>/sbin – Programs designed to be run by thesuperuser or root</p><p class=MsoNormal>/lib – Libraries of code</p><p class=MsoNormal>/dev – Device files for interfacing withhardware</p><p class=MsoNormal>/mnt - Mount point, directors that provideaccess to thedisks</p><p class=MsoNormal>/etc – System config files, similar towindows control panel</p><p class=MsoNormal>/lost+found – Files that were saved duringfailures are here</p><p class=MsoNormal>/misc – Miscellaneous purposes</p><p class=MsoNormal>/tmp – Temporary space for use by people orthe system</p><p class=MsoNormal>/var – Storage for variables and temporaryfiles such as themail queue </p><p class=MsoNormal>/usr – more system files supplied withLinux</p><p class=MsoNormal>/proc – Currently-runningprocesses</p><p class=MsoNormal><o:p></o:p></p><h2>Important Files andDirectories <o:p></o:p></h2><p class=MsoNormal><o:p></o:p></p><p class=MsoNormal>The Kernel</p><p class=MsoNormal>The kernel is the heart of the system, itcontrols thecommunication between the hardware and the peripherals. The kernelmakes surethat processes and daemons (server processes) are started andstopped at theexact moments. The kernel has many important tasks, it would lead ustoo faraway to discuss the kernel in detail. For now it is just importantthat youknow the kernel is the most important file on the system. </p><p class=MsoNormal><o:p></o:p></p><p class=MsoNormal>The Shell</p><p class=MsoNormal>The shell is a way to interface with thecomputer for typingcommands, executing them, and displaying the results, and it is away ofnavigating the directory tree. Similar to the Dos command prompt.The shell isan advanced way of communicating with the system.</p><p class=MsoNormal>Shell Types</p><p class=MsoNormal>yes"> style='mso-tab-count:1'> shor Bourne Shell: this isthe original shell still used on Unix systems. This is the basicshell, it’s asmall program with a few features.</p><h1>bash or Bourneagain shell: this is thestandard shell. The Bourne shell is compatible with the Bourne AgainShell,commands that work in sh style='font-weight:normal'>will also workin bash. However it doesn’t always work the other wayaround.<o:p></o:p></h1><p class=MsoNormal>csh orC cshell: Resembles the syntax of the C programminglanguage.</p><p class=MsoNormal>tcsh orTurbo C shell: an enhanced version of the common C shell.</p><p class=MsoNormal>If you don’t know which shell you areusing, type thecommand ‘echo $SHELL’style="mso-spacerun: yes"><o:p></o:p></p><pclass=MsoNormal><o:p></o:p></p>;<p class=MsoNormal>Navigating the Directory Tree</p><p class=MsoNormal>yes"> </p><p class=MsoNormal>The ‘cd’Command</p><p class=MsoNormal>The cd (change directory)command will change yourcurrent directory. Using the cd command with noarguments will set yourshell’s current working directory to your home directory. Example‘cd mnt’will take you to the /mnt directory</p><p class=MsoNormal><o:p></o:p></p><p class=MsoNormal>The ‘ls’Command</p><p class=MsoNormal>The ls command listsfiles and folders in yourcurrent working directory. To list all files in your current workingdirectoryyou would just type ‘ls’ by default ‘ls’will hide files thatbegin with a period. Other useful arguments are:</p><p class=MsoNormal>-a lists all filesincluding those that start with aperiod</p><p class=MsoNormal>yes"> -l longlisting, will give more details about each file.</p><p class=MsoNormal>[if !supportEmptyParas][endif]<o:p></o:p></p><p class=MsoNormal>The ‘cp’Command</p><p class=MsoNormal>This is the copy command. To use it youwould type ‘cpfile1 file2’ where file1 is the file you wish to copy andfile2 is the nameyou want to copy it too. You can use path names for example‘cp/home/alxciada/linux1.txt /home/flatline/linux1.txt’style="mso-spacerun: yes"> which wouldcopy a file called linux1.txtfrom my home directory to flatline’s home directory. Other usefulargumentsare:</p><p class=MsoNormal>-p – Will copy not onlythe file contents, but alsothe file’s permissions, timestamps and owner. (By default the ownerof the copywill be you, it will be time stamped now)</p><p class=MsoNormal>-i – interactive mode.Ask before overwriting files</p><p class=MsoNormal>-f – Force thecopy.</p><p class=MsoNormal>[if !supportEmptyParas][endif]<o:p></o:p></p><p class=MsoNormal>The ‘rm’command</p><p class=MsoNormal>The ‘rm’ (removecommand) can delete files anddirectories, simply type ‘rm filename’. style="mso-spacerun:yes"> Some useful arguments are:</p><p class=MsoNormal>-i – interactive mode,ask before deleting each file</p><p class=MsoNormal>-f – forces thedeletion, ignore errors and warnings </p></div> Quote Link to comment Share on other sites More sharing options...
MadBadSad Posted May 28, 2006 Report Share Posted May 28, 2006 n00b question is next !! Cu ce se mananca astea? Quote Link to comment Share on other sites More sharing options...