LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-24-2007, 12:55 AM   #1
gloomz
Member
 
Registered: Oct 2006
Posts: 137

Rep: Reputation: 15
Directories


I know how to navigate directories and everything, but how do you list all the directories.

Like I know /etc/ exists, but if I was new linux user, how would I know it exists.

Is there a command or something that lists all the important directory's?



Thanks for your time
 
Old 01-24-2007, 01:18 AM   #2
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 30
The command "ls /" will list the contents of the root directory (i.e. the "/"). These will be folders like /bin, /boot, /etc, /usr, /sys, /proc, /root, /home, etc. These are ALL important directories; do not remove ANY of them. Check the man page on the ls command (i.e. run "man ls" in the console) to see what it is capable of doing.

Briefly, its the command you use to list files in a directory. If you want to list all visible directories on the system, then run "ls -R /" (i.e. the -R flag tells ls to show the contents of folders). If you want to see other info (i.e. permissions, ownership, timestamp, size, etc.), then run "ls -l". You can combine options (i.e. "ls -lRa /", which is the same as "ls -l -R -a /", will list every file on the system (the -R flag), will list hidden files (the -a flag), and will list extra file information (the -l flag). Feel free to look through /bin (this is where ls lives), /sbin, /usr/bin, and /usr/sbin to see the commands available to you (the commands in /sbin and /usr/sbin, however, are usually reserved for the root user).
 
Old 01-24-2007, 02:09 AM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,318

Rep: Reputation: 126Reputation: 126
One thing to add (from experience) is to never ever do something like "rm xxx.*" or "rm *.xxx" while in one of these important directories. Because you can be sure that that one time will be the time that you fumble figure it and what winds up getting executed is "rm xxx. *" which removes everything in the directory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving directories to new directories keysorsoze Linux - Newbie 2 03-31-2006 08:14 PM
CHMOD directories.sub-directories.files zerojosh Linux - Software 2 11-19-2005 04:22 PM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 01:23 PM
Directories? Dev930 Linux - Newbie 3 02-28-2004 07:34 AM
directories in c++ erratic Programming 1 04-07-2001 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration