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.
I am really confused with the umask value 027 and 037.
umask value 027 and 037 is working identically for files. Why???
If you set umask value to 027, the newly created file's permission is 640 (666 - 027 = 640). But, if you set umask value to 037 and create a new file. The file's permission is also 640 (666 - 037 = 640??).
All I know is that to get the file's permission, umask is subtracted from 666. And for directory, umask is subtracted from 777.
its not 666 you substract from its 777. but since linux doesn't gives execute permission to files by default its coming the same. you have to explicity give execute permission for files.
AFAIK the action of umasking is not exactly to subtract, but to perform a bitwise AND of the inverse of the umask value (e.g. 0027 = 000010111 --> ~000010111 = 111101000 = 0750)
In your example:
Code:
666 in binary => 110110110
750 in binary => 111101000 (AND)
Result ======> 110100000 = 640
You get the same result with 0037 (~0037 = 0740):
666 in binary => 110110110
740 in binary => 111100000 (AND)
Result ======> 110100000 = 640
I am really thank you,JunctaJuvant. It is very helpful for me. I am newbie to Linux and trying to sit LPIC 101. Can you give me any advice for that exam??
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222
Rep:
Lpic - 101
Hi,
I recently sat for the LPI-101,102 exams and think I may be able to give you some pointers.
The exam's basically broken down into sections dealing with various topics, the critical areas being:
i) BIOS, Devices and other hardware issues - you'll be able to find some good documentation on this section at tldp.org. Lookup the Large-Disk-HOWTO and PPP-HOWTO.
ii) Common Linux utilities and commands (related to filesystem management, process control, stream editor utilities, etc). Its very important to get familiar with these commands and their most common options. For stream editor utilities experiment how different commands can be piped together and what output they produce.
iii) Package management utilities - learn how to manage packages using the RedHat package management system (RPM) and Debian's APT/DPKG utilities. There was plenty of documentation available regarding RPM but I couldn't find much on APT/DPKG (the DPKG-HOWTO does not cover all the material required for LPI-101). Installation, updating, uninstallation, verification, querying and checking the existing package database are all covered in this exam.
iv) Linux Filesystem Hierarchy - get familiar with the Linux filesystem hierarchy. Names and locations for important directories and files.
v) X Window System - Although this section is all the way at the bottom of the LPI 101 objectives list, don't underestimate this section. I made the mistake of just briefly browsing through the material and was stuck twiddling my thumbs for the last section of the exam.
Assuming that you've already installed a linux distro at home, one of the most important bit of advice I can give you is to explore and experiment. You may also consider taking the RedHat courses 033, 133, 253. Not strictly necessary but roughly around 65% of the material overlaps with LPI-101/102. Plus you'll gain some valuable hands on experience doing the lab work.
Practice exams can also help and there are plenty available on the internet.
While JunctaJuvant's post is 100% correct, I think it might be a little hard to understand for newbies (maybe not the explanation, but the act of training yourself to think like this). Since with permissions, you can take each digit at a time, it is easier to think about it this way when say doing '6 AND 5 = 4' and '6 AND 4 = 4'.
At least I can understand this faster, because I only need to keep track of three binary digits at a time (as opposed to nine). Also note that the base permission of files is 666 whereas for directories, it is 777.
First of all, I would like to say thank you all for giving attention to my thread. I am familiar with binary operation. So, binary operation is not problem for me.
I have installed FC5 on my pc and make practices. And I read O'Relly's LPIC 101 exam guide and use testking test engine to sit virtual exam. Is it enought for LPIC 101 exam??
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.