08-16-2010
thanks you both!
some questions:
- I don't know the mk command, is mkdir also good?
- shouldn't it be: if [[ ! -d $targetd ]] (exclamation mark) because needs to create dir when it doesn't exist
- same for the file check, shouldn't it be with exclamation mark?
- added quotes around mk -p "$targetd" because had issue with spaces in dir name
when I run the script with a test directory:
test (dir)
_sub test (dir)
___testfile
_testfileroot
I get the following in the target dir
test2 (dir)
_sub test (dir)
___empty!
_testfileroot (dir)
___testfileroot
so think I've made a small error somewhere?
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I know how send a html page through mailx, but how do I show the pictures(gif,jpeg,etc.) in the email? (4 Replies)
Discussion started by: Thomas
4 Replies
2. Programming
I am writing a program to display a database to the screen(xterm) and want to allow the window resize signal to increase/decrease the amount data that is displayed. I have a signal handler function for catching the SIGWINCH event and calling a function to reallocate the space for the windows... (0 Replies)
Discussion started by: kwaz
0 Replies
3. UNIX for Advanced & Expert Users
Hi,
I have 4 solaris 9(32-Bit) Sparc machines on the same subnet.
All 4 of them have different times( off by 10-15 mins).
I need to synchronize all 4 of them.
Please advise what I should do to sync them to the proper time, and with each other.
Thanks (3 Replies)
Discussion started by: 0ktalmagik
3 Replies
4. Shell Programming and Scripting
I use HP-UX & need help with time.
I use a script to create a date stamp: /bin/date "+%m%d%H%M" to get: 12080826.
I need a way to use the "touch -t" command to create a
file with a timstamp 30 minutes prior to that stamp. (12080756)
Can anyone help? (9 Replies)
Discussion started by: obrien2003
9 Replies
5. AIX
Hi,
I want to synchronize time on several AIX servers - I don't want to set very precise time value, but I want all the servers to have same time value.
How do I do that ?
thanks
Vilius (2 Replies)
Discussion started by: vilius
2 Replies
6. Shell Programming and Scripting
Hi guys,
I know that this topic has been discuss numerous times, and I have search the net and this forum for it.
However, non able to address the problem I faced so far.
I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies
7. Programming
Can we select the datetime from oracle database in “hhmmssnnnccyymmdd” format ?
please help to solve this..... (2 Replies)
Discussion started by: Sanal
2 Replies
8. Shell Programming and Scripting
I need a command or mini scripts that can find certain type of images file recursively from the current dir with files of minimum 736 width and resize them by "736 max width, relative height" and replace the source files. I currently have GD installed but can also install Imagemagick if needed, I'm... (5 Replies)
Discussion started by: Frozen77
5 Replies
LEARN ABOUT DEBIAN
radwho
RADWHO(1) FreeRADIUS Daemon RADWHO(1)
NAME
radwho - show online users
SYNOPSIS
radwho [-c] [-d raddb_directory] [-f] [-i] [-n] [-N nas_ip_address] [-p] [-P nas_port] [-r] [-R] [-s] [-S] [-u user] [-U user] [-Z]
DESCRIPTION
The FreeRADIUS server can be configured to maintain an active session database in a file called radutmp. This utility shows the content of
that session database.
OPTIONS
-c Shows caller ID (if available) instead of the full name.
-d raddb_directory
The directory that contains the RADIUS configuration files. Defaults to /etc/raddb.
-f Behave as the 'fingerd' daemon - waits for one line of input, then prints the output with lines
terminated.
-i Shows the session ID instead of the full name.
-n Normally radwho looks up the username in the systems password file, and shows the full username as well. The -n flags prevents this.
-N nas_ip_address
Show only those entries which match the given NAS IP address.
-p Adds an extra column for the port type - I for ISDN, A for Analog.
-P nas_port
Show only those entries which match the given NAS port.
-r Outputs all data in raw format - no headers, no formatting, fields are comma-separated.
-R Output all data in RADIUS attribute format. All fields are printed.
-s Show full name.
-S Hide shell users. Doesn't show the entries for users that do not have a SLIP or PPP session.
-u user
Show only those entries which match the given username (case insensitive).
-U user
Show only those entries which match the given username (case sensitive).
-Z When combined with -R, prints out the contents of an Accounting-Request packet which can be passed to radclient, in order to "zap"
that users session from radutmp.
For example,
$ radwho -ZRN 10.0.0.1 | radclient -f - radius.example.net acct testing123
will result in all an Accounting-Request packet being sent to the RADIUS server, which tells the server that the NAS rebooted. i.e. It
"zaps" all of the users on that NAS.
To "zap" one user, specifiy NAS, username, and NAS port:
$ radwho -ZRN 10.0.0.1 -u user -P 10 | radclient -f - radius.example.net acct testing123
Other combinations are also possible.
SEE ALSO
radiusd(8), radclient(1), radiusd.conf(5).
AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl.
7 April 2005 RADWHO(1)