Help please...random() in kernel? and Links?


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Help please...random() in kernel? and Links?
# 1  
Old 08-14-2005
Help please...random() in kernel? and Links?

1.Why is it not possible to use random() in kernel code? If the kernel cannot do that, what is going on when kernel code contains calls to printf(), it works fine?

2.Symbolic links in Linux and Unix can cross partition boundaries, but hard links cannot. Can somebody explain this to me?

Thank you
# 2  
Old 08-15-2005
Hard links

Quote:
Originally Posted by allomeen

2.Symbolic links in Linux and Unix can cross partition boundaries, but hard links cannot. Can somebody explain this to me?

Thank you
A hard link creates a new filesystem entry pointing to the data of the linked file - thus, it's more like a copy than a link, except that both files share the same data. With a hard link, if you delete the original, the linked file will still exist with all the original data, because it's not a special type of file, it's a filesystem entry pointing to the original data. Does that make sense? That's why you can't make a hard link across filesystems - the data being linked doesn't exist on the other filesystem.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Linux

Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)

Hi everyone, I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): 2) Blacklisted the module by adding the following string to 3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies

2. Shell Programming and Scripting

Need to generate a file with random data. /dev/[u]random doesn't exist.

Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom. I create a named pipe then: dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024 but when I cat a file to the fifo that's 1024 random bytes: cat randomfile.txt >... (7 Replies)
Discussion started by: Devyn
7 Replies

3. AIX

List all the soft links and hard links

Hi I'm logged in as root in an aix box Which command will list all the soft links and hard links present in the server ? (2 Replies)
Discussion started by: newtoaixos
2 Replies

4. Solaris

Hard Links and Soft or Sym links

When loooking at files in a directory using ls, how can I tell if I have a hard link or soft link? (11 Replies)
Discussion started by: Harleyrci
11 Replies

5. Ubuntu

expect script for random password and random commands

Hi I am new to expect. Please if any one can help on my issue its really appreciable. here is my issue: I want expect script for random passwords and random commands generation. please can anyone help me? Many Thanks in advance (0 Replies)
Discussion started by: vanid
0 Replies

6. Solaris

Which file is read by kernel to set its default system kernel parameters values?

Hi gurus Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies

7. SuSE

max number of slabs per kernel module (kernel 2.6.17, suse)

Hi All, Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff. Cheers, Brendan (4 Replies)
Discussion started by: Brendan Kennedy
4 Replies
Login or Register to Ask a Question