Next Previous Contents

10. Miscellaneous Questions

10.1 What is the maximum size of a single file under Linux?

That depends on the file system you're running on. The Ext2,Mimix,Ext filesystems on 32bit platform can store files up to 2Gb. On 64bit platforms (Alpha, UltraSparcs) Jakub Jelinek has provided patch to allow files greater that 2Gb which should be in 2.2.

10.2 What is buffer overflow?

Function bar(). Stack. Automatic variable (a) allocated on stack. Variable (b) points to carefully crafted overflow data. Function bar() does not check that (b) will overflow (a). Call function foo() with (a) and (b) parameters. Return address to bar() on stack. foo() writes data from (b) into (a) but (a) is too small. foo() does no bounds checking -- it's a fast library function and (correctly) expects good data. Overflow (a), which is on the stack with bar()'s return address. Return address to bar() is now bogus. Carefully crafted overflow causes 'return' to end up someplace fun, including, possibly, it's own code which is part of the bogus data we just filled the stack with. Maybe something like a system('/bin/bash') call...

10.3 Where can I find comparisions between Linux and other OS's?

Check out these sites:

10.4 Where to get db.cache file from?

Try :

dig . @rs.internic.net > named.cache
or
dig . @198.41.0.6 > named.cache
if your nameserver is not yet properly configured.

10.5 What are hard/soft links? What is the difference?

From ln(1) A hardlink to a file is indistinguishable from original file (for ex. it has the same file permittions/ownership as the original file). This permits multiple copies for a file, whithout using diskspace for multiple copies for a file. Removing the file will not remove contents of a file until removal of the last name of a file. Hard links may refer only to existing file.

A symbolic link (also known as soft link) contains only the name of the file to which it is linked, and should be thought as of inderection, instead of a copy. This inderection is accomplished automatically by the system. A symbolic link permits multiple filenames for single file or directory even across different filesystems. The owner, group, permittions, modification time etc. of sym. link are taken from the directory,in which it resides. Sym. links may refer to non-existent files as well.

Here's a short comparision of sym. and hardlinks done by pointing to its advantages and disatvantages:

Hard Link

Soft Link

10.6 When I try to install kernel I get ``kernel is too big''

Try ``make bzImage'' instead.

10.7 How do I tar files?

This question could be easily answered by just looking over man page for tar(1), but since it gets frequently asked on the list anyway, here it goes.

Basic syntaxis:

NOTEIf any of filenames here are directories, the whole directory will be compressed. to avoid this use find ... -type f ... | tar -cf filename.tar -T -

10.8 How can I leave processes running after I log out?

You can use screens. Run screen and run your command then create another screen using ^ac keys. Here write screen -d . This will dettach the screen. you can now log out. The command will still be running. When you want to get the control of the command back, just type screen -rand there you are.

Another way is to use nohup(1) utility.

Another way to do it is to use C code like:


close(0);
close(1);
close(2);
chdir("/");
open("lofile",O_WRONLY);
dup(0);
dup(0);
execv("yourprogram",NULL);

10.9 The command `logout' is executed everytime i press `Ctrl-D' (EOF), how can I disable it?

If you are using bash, you can put

        export IGNOREEOF=100
in your .profile.

from bash(1)

IGNOREEOF

Controls the action of the shell on receipt of an EOF character as the sole input. If set, the value is the number of consecutive EOF characters typed as the first characters on an input line before bash exits. If the variable exists but does not have a numeric value, or has no value, the default value is 10. If it does not exist, EOF signifies the end of input to the shell. This is only in effect for interactive shells.

this means if you hit Ctrl-D over 100 times in succession it will log you out.:-)

10.10 What are methods of locking files in Linux?

There are generally two methods of locking files:

10.11 I have some sort of weird files on my filesystem, which I can not remove, why?

Your files are probably having readonly attributes, or your filesystem might be corrupted. (or just mounted read-only, you know what to do here, right?:))

First, run

fsck -f
on your filesystem. Then try using
chattr -i 
on both files and directory, which these files reside in. If your files are having immutable attribute set, even root can not delete nor modify them. Use somehing like
chattr -acidsu [file] ; rm [file]
to fix that.

10.12 How do I make a copy of one drive to another?

Assuming your new drive is /dev/hda1:

10.13 What are config files for taylor uucp package?

This question actually should go to UUCP-HOWTO, instead of this FAQ, but since it's been asked for several times, and not only linux-admin mailing list, I decided to put it here. All the files are to be located in uucp configuration directory. ( /etc/uucp or /usr/lib/uucp/taylor_config).

Hope it helps. For more info there's a uucp-howto, and a doc file at ftp://ftp.gnu.org/gnu/uucp/ available.

10.14 How do I know if my swap partition is being used/turned on/working? How I turn it on, if it's off?

free
command should say whether you use swap on the current moment:
bash$ free
             total       used       free     shared    buffers     cached
Mem:         14800      14196        604      14920        588       3488
-/+ buffers/cache:      10120       4680
Swap:        61452       7808      53644

if in

Swap:
row it shows '0' as total, then your swap partition is probably off. To turn it on you may do the following:

10.15 How to make man pages printable?

10.16 What do `Lame server on foo.bar.com...' error messages generated by named mean?

This means that the server, to which the domain is delegated, doesn't consider itself to be authoritative for the domain, or speaking in simple words it just isn't proper namesever for this domain.

This is basically isn't your problem, but the problem of domain owner, and there are very few things you could do about it. (the only thing is properly to contain domain maintainer and ask him to fix this bug).


Next Previous Contents