- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Favorite Little used commands
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2004 08:02 PM
01-29-2004 08:02 PM
Re: Favorite Little used commands
cd -
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2004 08:58 PM
01-29-2004 08:58 PM
Re: Favorite Little used commands
dumpmsg : use with the files in /usr/lib/nls/C to get exit codes etc for some commands.
od : it may be a bit of a headache at times, but od -c can occasionally get you more info on a non-text file than strings.
which/whence : helpful if you want to know where you're running things from.
adjust : basic text formatting.
dirname/basename : path/file details - useful in scripts.
line : like read, but with a timeout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 05:44 AM
01-30-2004 05:44 AM
Re: Favorite Little used commands
Listing binary or special characters:
--
- xd (better than od which is octal), the best listing option (looks like a mainfram dump) is: xd -xc
- cat -v (quicky to show special chars)
- ll -b (see special chars in a filename)
What did the shell run? which and whereis are deprecated (I love that word) as far as determining exactly what will happen when you type a command. whereis looks in common places but overlooks /opt and /sbin completely. which looks in the current PATH but knows nothing about shell builtins. The best command is type which is an alias to whence -v. If you type pwd, you are not seeing what which and whereis are reporting. pwd is first a built-in and it produces a different result from /usr/bin/pwd.
# cd /usr/spool/lp
# pwd
/usr/spool/lp
# /usr/bin/pwd
/var/spool/lp
# whereis pwd
pwd: /usr/bin/pwd /usr/share/man/man1.Z/pwd.1
# which pwd
/usr/bin/pwd
# type pwd
pwd is a shell builtin.
So you can see that which and whereis are giving differnt results than type (whence -v) and most important: /usr/bin/pwd gives the true PWD while the shell built-in just reports on $PWD.
Another example is aliases:
# which rm
/usr/bin/rm
# whereis rm
rm: /sbin/rm /usr/bin/rm /usr/share/man/man1.Z/rm.1
# type rm
rm is an alias for /usr/bin/rm -i
And just to emphasize that the shell determines what will happen:
# which let
let:
# whereis let
no let in /usr/bin /usr/ccs/bin /usr/contrib/bin /opt/mx/bin /opt/hparray/bin /opt/nettladm/bin /opt/upgrade/bin /opt/fcms/bin /opt/resmon/bin /opt/pd/bin /usr/bin/X11 /usr/contrib/bin/X11 /opt/scr/bin /opt/perf/bin //opt/perl/bin /opt/prm/bin /usr/sbin/diag/contrib /opt/wlm/bin /opt/ignite/bin /opt/hpnpl//bin /opt/graphics/common/bin /opt/sec_mgmt/spc/bin /opt/sec_mgmt/bastille/bin /sbin /usr/sbin
# type let
let is a shell builtin.
Shell math
---
$(( math stuff ))
expr math-stuff
let
Of the above, let seems to be the most intuitive with expr fairly cryptic and $(( )) similarly tricky to use. And since the shells do not know anything about fractions (integer only), the tool of choice is bc:
# echo "scale=4 \n 25.4/36.6" | bc
.6939
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 07:09 AM
01-30-2004 07:09 AM
Re: Favorite Little used commands
"select" for building instant menus of dynamic length
"deroff" and "fold" on systems where printing a man page is a bit challenging; i.e., man pwd|deroff|fold|lp -d [printer]
"case" when I'm shell scripting and I've got more than two options which makes using "if" combersome quickly
'exec 1>[filename]' to reroute standard out inside a shell script.
'while read -u4 VARIABLE; do' to read from standard input directly to a variable
"banner" from back in the day when a printer was a 132 column printronix or other similar impact printer
"at" for testing processes I want to put into cron without having to edit the crontab multiple times
"look" in combination with "sort" for locating strings in large files, especially files with line-lengths larger than vi likes to deal with
"od" to peak into binary files
and "make", which I want to use more often so I can learn it better, but unfortunately seldom have enough data and script or program files to justify the effort to build a makefile.
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 07:24 AM
01-30-2004 07:24 AM
Re: Favorite Little used commands
cpio is useful with find and other things...
find . -depth -print | cpio -dumpvA /dest/path
pslp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 07:36 AM
01-30-2004 07:36 AM
Re: Favorite Little used commands
leave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 08:40 AM
01-30-2004 08:40 AM
Re: Favorite Little used commands
Thats "Coneheads" not "pointyheads". At least get the planet right ....
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 02:06 AM
02-26-2004 02:06 AM
Re: Favorite Little used commands
Not thread related but didn't know how else to contact you. I saw you had posted a while ago on an LVM striping question and that you were doing so on EMC. We also will be using EMC striped on the back end (meta volumes) and hardware mirrored. EMC is telling us to user LVM striping at the OS level but I'm not sold on the idea. I've read on the ITRC that this is beneficial if your data is sequential, most of ours is not. EMC has given us bad info in the past, what are your impressions of LVM striping on EMC disks?
Thanks,
Jim Brand
Union Pacific RR
St. Louis, MO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 06:14 AM
02-26-2004 06:14 AM
Re: Favorite Little used commands
echo \$Z | /usr/sbin/sendmail -bt -d
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 06:53 AM
02-26-2004 06:53 AM
Re: Favorite Little used commands
I dont see any reason to fret over striping... My EMC storage is h/w mirrored on the backend and I stripe it on the host side.
My data is not sequential, to the best of my knowledge with a >1TB DB for production. it is spread out over at least 15-27 filesystems of 70GB each, room is left for growth of course. Total of 1.9TB for production about 1.2 is actually used.
My systems are exclusively striped for Oracle DBs... with 128mb stripe size. I also use the advanced caching, largefiles, and delaylog for my filesystem definitions.
------------------------------------------------------
delaylog,largefiles,nodatainlog,mincache=direct,convosync=direct
------------------------------------------------------
We used to have raw DB spaces waaay back when, but when we went to mounted DBs. We chose to do striping for faster readability. Sure we suffer a bit on writes, but resposiveness of the DB is of higher importance.
I have over 6TB of total space dedicated to my DBS on production/test/development boxes. and I will be adding another 5TB for future growth. All of that will be striped.
Someone else may have issues with striping, but not me. Mine is a very mature DB, which we have been running since May 2002 on my 48-way Superdome.
PS: Of course, I have my disks spread out across several HBAs with dual pathing and Powerpath as well. So that will make a difference on I/O bandwidth.
What issues have you heard about?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 07:24 AM
02-26-2004 07:24 AM
Re: Favorite Little used commands
We are also now implementing PowerPath - instead of manually load balancing at the LVM level.
Whatever you do - do NOT allow EMC to sell you on Parity RAID - performance just plain sucks on it...
Mirroring/striping is only way to go :)
My 2 cents.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 07:27 AM
02-26-2004 07:27 AM
Re: Favorite Little used commands
Actually I believe that Oracle had recommended against it several years ago when we were configuring some new servers. Not quite sure why. Other than that just what I mentioned about striping being more beneficial with sequential data, which I got from a rather old document on the ITRC:
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062686228
Glad to see you are having no problems. Sounds like your configuration is similar to ours except we are using rp's instead of superdomes. And yes, we also quit using raw space years ago.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 07:44 AM
02-26-2004 07:44 AM
Re: Favorite Little used commands
Now with our faster network, 100FD from my host, extremely fast CPU(875), using SD/RPs, and faster HBAs, switches, et al. I think it is more reasonable now than it used to be
My total env for DB are 1 SD, 2 Keystones, 3 Nclass and 5 N-class for my web-tier, no DB on them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 07:53 AM
02-26-2004 07:53 AM
Re: Favorite Little used commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 08:08 AM
02-26-2004 08:08 AM
Re: Favorite Little used commands
getconf HW_CPU_SUPP_BITS
## This tells you whether you are running 32 or 64 bit OS. There are a plethora of criteria in the man page.
$$ NO it is what your hardware is capable.
For newer platform it is the same as
getconf KERNEL_BITS
Just try on a narrow kernel on a D380 for instance:
# getconf HW_CPU_SUPP_BITS
32/64
# getconf KERNEL_BITS
32
On a Wide K460:
# getconf HW_CPU_SUPP_BITS
32/64
# getconf KERNEL_BITS
64
On a L class
# getconf HW_CPU_SUPP_BITS
64
Else for the usefull commands:
adb to modify any binary file, modify kernel
as a simple calculator (Hex, octal, dec)
to search a patern in a file
strings -a display every strings from an
object or executable file
what
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 08:17 AM
02-26-2004 08:17 AM
Re: Favorite Little used commands
the coprocess:
for instance open a socket on a port in shell
(posix or ksh)
telnet |&
exec 4>&p 3<&p
echo open targetsystem targetport >&4
while read a
do
echo $a
done <&3 &
echo "^]" >&4
echo "close" >&4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 02:21 PM
02-26-2004 02:21 PM
Re: Favorite Little used commands
lastb
both indicate last logins of users and ttys
fuser - list and kill processes.
finger - gives information of a login(user) in the system
With Best Wishes
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 04:59 PM
02-26-2004 04:59 PM
Re: Favorite Little used commands
nslookup
traceroute
history
umask
uname -a
strings
elm
pg
the list goes on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 06:39 PM
02-26-2004 06:39 PM
Re: Favorite Little used commands
pax - reads/writes files in tar AND cpio format. Really handy if you don't know what someone gave you. And pax has a nice syntax if you need to copy directory structures across filesystems.
nl - mentioned before, handy to use in combination with other commands.
/usr/bin/cd - I never knew it existed till the recent post, but still think it can come in handy
fold and pr - can come in handy for printing, but also viewing files with long lines. They get truncated on blanks.
troff - especially for printing manual pages in a nice format: troff -man /usr/man/man1/ls.1 | lp (for instance).
Problem with this thread is of course to remember the commands even though you use them little... And nice commands you use often should not be mentioned, like the 'cut' command, which I use very often. Or the '!!' command in vi:
!!env | grep ^PATH
replaces the current line with your current PATH setting in the file you're editting... Very handy for cron scripts...
Just some things that came to my mind...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 09:11 PM
02-26-2004 09:11 PM
Re: Favorite Little used commands
adjust
fold
getip
vis and inv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 09:41 PM
02-26-2004 09:41 PM
Re: Favorite Little used commands
ied ftp
ied sqlplus
ied cstm
etc...
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2004 12:33 AM
02-27-2004 12:33 AM
Re: Favorite Little used commands
export DISPLAY=name_client:0.0
resize
bdf
ls -al
find . -name *text*
elm
rm rf name_dir
etc etc
Regards Ernesto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2004 12:45 AM
03-01-2004 12:45 AM
Re: Favorite Little used commands
print_manifest - ignite tape_recovery &
system information
diff - for comparing two files
tr - translating characters
from string to string
pwck - integrity of passwd file
grpck - integrity of group file
Keith
- « Previous
-
- 1
- 2
- Next »