|
Alfajor posted:I'm trying to figure out some C code (basically a if (chmod (file,mode)) ). What is the return type of chmod, and more importantly, what's what? 1 true? or 0 is true? The manual is your friend here. Sections 2 and 3 cover system calls and standard library functions, respectively. Thus: man 2 chmod posted:CHMOD(2) Linux Programmer’s Manual CHMOD(2)
|
| # ¿ May 23, 2007 18:04 |
|
|
| # ¿ May 26, 2013 09:13 |
|
JoeNotCharles posted:If you don't have the manpages installed on your system, google for "man chmod" will find online copies. This is true. Another trick is to note that the user command chmod is found in section 1, and thus referred to within documentation as chmod(1), whereas the function is a system call and in section 2 and thus referred to as chmod(2). So, when you go off and google, you can get more useful results by googling chmod(2) or whatever. Any functions you'd be looking up will be in section 2 or 3, which makes it relatively easy to avoid ambiguous cases (such as printf(1) vs printf(3) &c.) . And, as noted before, when using man, you specify the section before the command.
|
| # ¿ May 23, 2007 18:09 |
|
Seaneseor posted:I'm running Ubuntu (Feisty) and I can't figure out how to kill the "init" process.
|
| # ¿ Jun 2, 2007 07:05 |
|
marcan posted:I regularly get hammered with SSH dictionary attacks. It doesn't mean someone is specifically targetting your machine - lots of people just do random probes against anyone with port 22 open. When I first installed sshd, I would get dictionary-attacked about twice a week. At first, I would run a whois on all the IPs of hackers I found by grepping through /var/log/auth.log, and send emails to the listed addresses informing them their systems had been compromised and were being used by crackers (interestingly, most of the zombified boxes were in Asian university networks). I was never really afraid of getting cracked successfully, as I disabled remote root login and used strong passwords, but the attempts were disconcerting. Then, I modified /etc/sshd_config so that my server daemon was no longer on port 22. I've had no unauthorized access attempts since.
|
| # ¿ Aug 12, 2007 03:45 |
|
invid posted:By on the fly, I meant with the "/" still mounted. You don't need to do this. It's actually quite easy to resize the partition while your computer is running; any Linux LiveCD will have a copy of gPartEd, which will allow you to create/destroy/grow/shrink partitions graphically. And, a LiveCD doesn't mount your drive - it's a full OS on a disk. So, to wrap up: 1. Download ISO of a LiveCD (here is an Ubuntu LiveCD image) 2. Burn ISO to a CD as the disk image 3. Put LiveCD in drive 4. Reboot 5. Your system will boot off the LiveCD 6. Run gPartEd to do your partitioning 7. Shut down (disk will eject at end of shutdown sequence 8. Reboot back into your system, enjoy repartitioned goodness
|
| # ¿ Aug 14, 2007 04:22 |
|
Cancelbot posted:I have a pretty big question - I find vista to be overkill for my little laptop and wish to dual boot it as Ubuntu for day to day things (coding, web, email etc) and vista for games and windows apps i cant run under ubuntu. The ubuntu partition is only going to be small (around 10-15gb) which should be plenty as my documents/music etc. are stored on external hard drives. The Ubuntu installer will auto-magically shrink your Vista partition, make its own (and a swap partition), and install a bootloader by default. As for any scheme that dicks with partitions and/or the boot sector, back up your important data first.
|
| # ¿ Sep 4, 2007 21:00 |
|
|
| # ¿ May 26, 2013 09:13 |
|
Kaluza-Klein posted:Linux just blew my mind. The special files '.' and '..' point to the current directory and its parent, respectively. When you moved directory 'A' into directory 'B', the '.' and '..' special files were changed accordingly to point to '/path/to/B/A' and '/path/to/B', respectively. It's always been like this. As an aside, all of the following are equivalent (in that they all change to your home directory): code:
|
| # ¿ Dec 24, 2007 08:18 |





Looks like I've to get a new HDD just to mount /vz.