04-14-2012
You can get the information directly from the source by creating a custom udev rule. You can use them to run simple commands whenever a device is detected. See man udev for details and examples, and also check out the udev rules your system already has ( which do things like populate /dev/disk/by-path/ ) which may be under /etc/udev.d/ or /lib/udev/rules.d/
On my system, custom rules are kept in /etc/udev.d/ while system ones are kept in /lib/udev/rules.d/
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a tab delimited file which has 27 character fields. The file needs to be loaded into an Oracle table. But the challenge is that everytime the file comes it may or may not have values in all 27 fields.
Column Definition of the 27 fields:
TYPE: Char (1)
NAME: Char (30)
CUSTOM_VAL: Char... (8 Replies)
Discussion started by: madhunk
8 Replies
2. UNIX for Dummies Questions & Answers
Hi friends how can we read array elements dynamically in bash shell? (1 Reply)
Discussion started by: haisubbu
1 Replies
3. Programming
Hey,
First of all I want to know How do I see the atime of a file ?? Whats the command ??
I think ls -l shows the last modified time right ? Because when I use cat to read a file, the timestamp shown by ls -l does not change.
Its not ls -lu ! man ls did not help ! How do I see the last... (8 Replies)
Discussion started by: tantric
8 Replies
4. Shell Programming and Scripting
I have a directory with its subdirectories and files. I want to change them all to read only. Say it is ~/test
chmod -R 444 ~/test
chmod: `/home/myname/test': permission denied
I do not understand. Do I have to have executable mode for a diirectory to access.
How can I change ~/test to... (5 Replies)
Discussion started by: lalelle
5 Replies
5. Linux
Hello everyone I recently clone a system and doing so it gave my nics cards id's of eth3 and eth4 instead of eth0 and eth1. Is there a config file or something out there where I can change these back? All help will be appreciated. (2 Replies)
Discussion started by: aojmoj
2 Replies
6. Shell Programming and Scripting
Hi All
At the moment the following code works but ideally i do not want to have to change the original $1
tr "\r" "\n" < "$1" > "$1.fix"
printf "\n" >> "$1.fix"
mv "$1.fix" "$1"
FILE=$1
coffee_out="splitmovie"
coffee_fill="-splitAt"
coffee_end="-self-contained -o output.mov $2"... (1 Reply)
Discussion started by: babajuma
1 Replies
7. UNIX for Dummies Questions & Answers
Hi
my requriment is read the file name dynamically my code is
#!/bin/sh
file="/c/work/loan/"
Header_Trailer_move()
{
sed '1d;$d' $file| cat >sam.txt
}
Header_Trailer_move
in above given path my list of files or there i have to read file dyanamically when i entered particular file name... (2 Replies)
Discussion started by: sgoud
2 Replies
8. Programming
I have the following piece of code. Currently the command line arguments are passed as shown below using the "= "sign. I capture the name of the argument, for example vmod and it's corresponding user parameter which is jcdint-z30.cmd.
./raytrac vmod=jcdint-z30.cmd srFile=jcdint.sr
Now I want... (12 Replies)
Discussion started by: kristinu
12 Replies
9. Shell Programming and Scripting
Linux Redhat, BASH Shell.
I want to put this in my .bash_profile
I have log files that go to directory paths based in part on other variables such as went DB Name is set in memory. So if the DB Name changes the path to the log file changes. How do I create an environment variable I put into... (6 Replies)
Discussion started by: guessingo
6 Replies
UDEVD(8) udevd UDEVD(8)
NAME
udevd - event managing daemon
SYNOPSIS
udevd [--daemon] [--debug] [--children-max=] [--exec-delay=] [--resolve-names=early|late|never] [--version] [--help]
DESCRIPTION
udevd listens to kernel uevents. For every event, udevd executes matching instructions specified in udev rules. See udev(7).
On startup the content of the directory /lib/udev/devices is copied to /dev. If kernel modules specify static device nodes, these nodes are
created even without a corresponding kernel device, to allow on-demand loading of kernel modules. Matching permissions specified in udev
rules are applied to these static device nodes.
The behavior of the running daemon can be changed with udevadm control.
OPTIONS
--daemon
Detach and run in the background.
--debug
Print debug messages to stderr.
--children-max=
Limit the number of parallel executed events.
--exec-delay=
Number of seconds to delay the execution of RUN instructions. This might be useful when debugging system crashes during coldplug cause
by loading non-working kernel modules.
--resolve-names=
Specify when udevd should resolve names of users and groups. When set to early (the default) names will be resolved when the rules are
parsed. When set to late names will be resolved for every event. When set to never names will never be resolved and all devices will be
owned by root.
--version
Print version number.
--help
Print help text.
ENVIRONMENT
UDEV_LOG=
Set the logging priority.
KERNEL COMMAND LINE
udev.log-priority=
Set the logging priority.
udev.children-max=
Limit the number of parallel executed events.
udev.exec-delay=
Number of seconds to delay the execution of RUN instructions. This might be useful when debugging system crashes during coldplug cause
by loading non-working kernel modules.
AUTHOR
Written by Kay Sievers kay.sievers@vrfy.org.
SEE ALSO
udev(7), udevadm(8)
udev 11/07/2011 UDEVD(8)