07-22-2009
ls command with a welcome message !
Dear Friends ,
Is it possible to generate a welcome message when I give the command "ls" from a particular user's home directory in Unix/Linux platform ?
suppose , in following example ,
bash-3.00# whoami
root
bash-3.00# ls
When I give ls command then it shows the output as well it gives a welcome message like "Welcome to the root's home directory" .
Is it possible to do ?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello All,
hope someone here can help me with this. I am a new unix system administrator on the HP-UX machine. Every night, our operators back up our file system using one tape but as of recently, our files have gotten bigger and it now requires 2 tapes for a complete backup. Since the operators... (3 Replies)
Discussion started by: sanjit
3 Replies
2. UNIX for Dummies Questions & Answers
Ran into a new one today at work......
I was told to start 2 servers which were shut down due to a power outage(I don't believe they were shut down incorrectly).
After fsck, both console logins appear with the message:
INIT: Command is respawning too rapidly. Check for possible errors.
>... (5 Replies)
Discussion started by: finster
5 Replies
3. UNIX for Advanced & Expert Users
in the last command..........what's this mean? i truncated the user name for obvious reasons, b
b rexecd Wed Jan 7 08:53 still logged in
b rexecd Wed Jan 7 08:53 still logged in
b rexecd Wed Jan 7 08:53 still logged in
b rexecd Wed Jan 7 08:53 still... (1 Reply)
Discussion started by: csaunders
1 Replies
4. UNIX for Dummies Questions & Answers
Dear all,
when I issue the command:
gunzip -c file.gz |sort
the command is executed normally and correctly but a message keeps appearing everytime I run the command:
the message:
sort: missing NEWLINE added at end of input file STDIN
Does anyone know what is the meaning of this message?... (3 Replies)
Discussion started by: marwan
3 Replies
5. UNIX for Advanced & Expert Users
Running the find command as: find /abc -follow -ls gives, for some files, the message, which I have never seen before:
find: /abc/def/123.txt: No error
Does it mean that find found the file with out error. If it found it without error then why did it not output the "ls" particulars as with... (2 Replies)
Discussion started by: twk
2 Replies
6. Shell Programming and Scripting
I am trying to add a message while archive some files.
For example I am using the below command to archive some files
tar -cvf inst.tar Linux
The command gives the terminal display like as below
I want to add a message beginning of each line followed by orginal message and end... (4 Replies)
Discussion started by: k_manimuthu
4 Replies
7. Shell Programming and Scripting
Trying to run the following awk command :
export com.mics.ara.server.tools.sch_reports.Runner.num_threads=`awk -F= '!/^#/ && /com.mics.ara.server.tools.sch_reports.Runner.num_threads/{print $2}' $BKUPDIR/env.properties`
-bash: export:... (6 Replies)
Discussion started by: venhart
6 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I wrote a script and part of the script, I have a validation to check if the file has <EOF> on the last line of the
file. If it does not have a <EOF>, then a message has to be written to a log file.
the code snippet shown below works fine, but it writes the below message if the... (1 Reply)
Discussion started by: Vijay81
1 Replies
9. Shell Programming and Scripting
I have a script like this:
echo "enter filername in lowercase"
read -e filername exec 2>&1
echo "type the start date in format MM/DD/YYYY"
read -e startdate exec 2>&1
echo "enter the end date in format MM/DD/YYYY"
... (2 Replies)
Discussion started by: newbie2010
2 Replies
10. Shell Programming and Scripting
Heyas
As there was a splitting issue with TUI 0.6.6-x focused around tui-status since the 'solaris' (not really but for that purpose) update, the urge was given to do this first.
Well, the splitting 'bug' should be fixed, i hope.
But i've found a new one.
When i start the very same script... (4 Replies)
Discussion started by: sea
4 Replies
msgid(1M) System Administration Commands msgid(1M)
NAME
msgid - generate message IDs
SYNOPSIS
/usr/sbin/msgid
DESCRIPTION
The msgid utility generates message IDs.
A message ID is a numeric identifier that, with a high probability, uniquely identifies a message. The probability of two distinct messages
having the same ID is about one in a million. Specifically, the message ID is a hash signature on the message's unexpanded format string,
generated by STRLOG_MAKE_MSGID() as defined in <sys/strlog.h>.
syslogd(1M) is a simple filter that takes strings as input and produces those same strings, preceded by their message IDs, as output. Every
message logged by syslogd(1M) includes the message ID. The message ID is intended to serve as a small, language-independent identifier.
EXAMPLES
Example 1: Using the msgid command to generate a message ID
The following example uses the msgid command to generate a message ID for the echo command.
example# echo hello | msgid
205790 hello
Example 2: Using the msgid command to generate a message catalog
The following example uses the msgid command to enumerate all of the messages in the binary ufs, to generate a message catalog.
example# strings /kernel/fs/ufs | msgid
137713 free:
freeing free frag, dev:0x%lx, blk:%ld, cg:%d, ino:%lu, fs:%s
567420 ialloccg: block not in mapfs = %s
845546 alloc: %s: file system full
...
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
syslogd(1M), attributes(5), log(7d)
SunOS 5.10 9 Oct 1998 msgid(1M)