Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey everyone, I'm really new to Linux and I just had a few really basic general questions to ask. I'm sorry if these questions are answered somewhere else but I couldn't find them. If you could point me to a good site for these sorts of questions then I'd appreciate that too.
1) What is a regular file on a Linux system? What sorts of regular files can exist and what values can the bytes within each have?
2) On Windows, most of the time when you install an application all its relevant files go in the same directory (ie. under Program Files\whatever), how is this different in Linux?
3) In addition to the normal permission bits of a node (rwxrwxrwx) what is the 10th bit for and how is it special? What uses does the special bit have?
4) What does having write access allow you to do compared with write access on individual files? Does it give you write permissions on all files within? Or just the permissions to create new files?
5) What is an inode? What does it do? Are all the blocks which comprise an inode necessarily in the same physical location?
6) Is it possible to hardlink directories in Linux? Why/why not?
Thanks in advance, I know these are really stupid/simple questions, and I appreciate any answers you can give.
1) On Linux, everyhting is a file. Seriously even devices are files.
2) The executables are kept in /bin, /usr/bin, /local/bin, /usr/local/bin, /sbin, /usr/sbin
and probably more. I can't think of any right now. That might seem like over kill, but it is actually very well organized. I don't want to go into detail, but most of them will be stored in /usr/bin or /usr/local/bin. There will rarely (if ever) be a need for you to locate an executable.
3) The first bit specifies the file type.'-' is ordinary, 'd' is directory, 'l' is link.
4) When set for a directory, this permission grants the ability to modify its tree. This includes creating files, changing their permissions, and deleting files.
Hey everyone, I'm really new to Linux and I just had a few really basic general questions to ask. I'm sorry if these questions are answered somewhere else but I couldn't find them. If you could point me to a good site for these sorts of questions then I'd appreciate that too.
1) What is a regular file on a Linux system? What sorts of regular files can exist and what values can the bytes within each have?
A regular file is any which has no special role in the operating system. So it isn't, for eg, a directory, a link, or a block special device. Text files are regular files. The bytes inside each file can have any value from 0 to 256.
Quote:
2) On Windows, most of the time when you install an application all its relevant files go in the same directory (ie. under Program Files\whatever), how is this different in Linux?
In linux, it is usual for only the files directly concerned with only the program in question are in the same place. There are many shared programs and libraries, used by many applications, which will not be in the same directory at all. Shared stuff often ends up in /usr/share. System executables will end up in /sbin and user executables are often in /usr/bin ... but not always. This modular approach means you seldom get multiple instances of a sub-program installed simultaniously.
Quote:
3) In addition to the normal permission bits of a node (rwxrwxrwx) what is the 10th bit for and how is it special? What uses does the special bit have?
The tenth bit is at the beginning and specifies the file type. - is a regular file, d is a directory etc. See the chmod man page for details.
Quote:
4) What does having write access allow you to do compared with write access on individual files? Does it give you write permissions on all files within? Or just the permissions to create new files?
You mean, write access to what? A file system mounted rw will confer read/write access to all files therein. (see the chmod man page)
Quote:
5) What is an inode? What does it do? Are all the blocks which comprise an inode necessarily in the same physical location?
6) Is it possible to hardlink directories in Linux? Why/why not?
Yes. See the ln manpage for details.
Quote:
Thanks in advance, I know these are really stupid/simple questions, and I appreciate any answers you can give.
Most of what you want to know is on the web already. Google is your freind. But at least you are trying to understand.
If you have a question about what something is or means, type "definition <thing>" in the google searchbar. The definition will give you more search terms to the exact info you need.
questions about something associated with a command can usually be investigated through the linux man pages. Open a terminal and type "man <thing>" or "info <think>" to learn more.
Welcome to the community.
Last edited by Simon Bridge; 05-02-2006 at 01:05 AM.
Hmm, this does sound kinda like homework, but anyway...
Quote:
4) What does having write access allow you to do compared with write access on individual files? Does it give you write permissions on all files within? Or just the permissions to create new files?
I assume you mean write access to a directory? This gives you permission to "modify" the directory, i.e. create/delete files in it. But you cannot modify the files themselves unless you have write permission to those files. So if root creates a file in your home directory with 600 permissions, you can delete the file, but you can't edit it.
Quote:
Quote:
6) Is it possible to hardlink directories in Linux? Why/why not?
No, you cannot hard link directories. This would allow the creation of loops, which would screw up any program which accessed the filesystem (ls, fsck etc). The directory tree must be one-way, top to bottom. For example, if you had a directory /var/hardlink, which was hardlinked back to /var, then ls -R /var would get stuck in an infinite loop.
OK, just checking, half the time people seem to ignore me .
Anyway, my above post shows that you cannot create hard links to directories. I believe that it was possible with ye olde unix (V6,V7 etc), but since it causes huge problems, it is now disallowed by the kernel (well, Linux at least, I assume all modern kernels are the same but I'm not sure).
Well I'm studying Linux at university and I've been using Fedora Core 4 on the lab computers. I haven't been able to set it up at home yet (so I don't know about compiling my own kernels or anything like that yet). Anyways I've just been learning the commands and I'm not very familiar with the workings of the OS, that's why I had several questions and thought this would be the best place to ask.
In regards to question 4, I meant does having write permissions on a directory give you write permissions on all files within as well as giving you permissions to create new files in the directory??
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.