- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ksh -i vi instead of -o option
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
06-24-2002 04:54 AM
06-24-2002 04:54 AM
ksh -i vi instead of ksh -o vi on my directory.
My directory is now unreadable. though I could change to the directories that I know. within the same gabbled directories.
Please, do not try it on a production system or a dirctory with useful files if you do not know how to resolve.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 05:03 AM
06-24-2002 05:03 AM
Re: ksh -i vi instead of -o option
from the man page...
Invoking ksh
If the shell is invoked by exec (see exec(2)), and the first character
of argument zero ($0) is -, the shell is assumed to be a login shell
and commands are read first from /etc/profile. The expression
${HOME:-.}/.profile is then evaluated and an attempt to open the
resulting filename is made. If the file is opened successfully, the
file is read. Next, commands are read from the file named by
performing parameter substitution on the value of the environment
parameter ENV, if the file exists. If the -s option is not present
and arg is, a path search is performed on the first arg to determine
the name of the script to execute. When running ksh with arg, the
script arg must have read permission and any setuid and getgid
settings are ignored. Commands are then read as described below. The
following options are interpreted by the shell when it is invoked:
:
:
-i
If the -i option is present or if the shell input
and output are attached to a terminal (as reported
by tty(3C)), the shell is interactive. In this
case SIGTERM is ignored (so that kill 0 does not
kill an interactive shell) and SIGINT +1 is caught
and ignored (so that wait is interruptible). In
all cases, SIGQUIT is ignored by the shell. (See
signal(5).)
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 05:06 AM
06-24-2002 05:06 AM
SolutionAnyway, all its done is created lots of files with strange filenames and control characters in them which each time you list them screw up your display.
To display them without screwing up your display do;
cd
ls -l | vis | more
From this you will see any control characters shown as \xxx. These are the files you need to delete. You can firstly try;
rm -i ./*
And it will ask for confirmation on each file in turn if you want to delete it. Delete any which look like garbage. I tried this first and still my display got corrupted when using rm -i ./* !! So instead I had to do;
ls -l | vis | more
and look for any files with \xxx (control characters in them) and try to remove them first with rm, ie. if they start with a\001\034.. then rm a*
Once I did this a few times rm -i ./* worked and I could remove the rest of the funny filenames, then all was back to normal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 05:15 AM
06-24-2002 05:15 AM
Re: ksh -i vi instead of -o option
Wonderful, Thanks for the assistance. I have my directories back now.
You are the man.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 05:31 AM
06-24-2002 05:31 AM
Re: ksh -i vi instead of -o option
Can you explain what ls -l|vis does?
Thanks & Regards
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 05:34 AM
06-24-2002 05:34 AM
Re: ksh -i vi instead of -o option
However, the ls/ll command has the equivalent feature:
ll -b
The idea is to make special characters visible.
A note for user that find themselves in this situation (a lot of files with control characters)...HP terminals (and HP terminal emulators such as WRQ's Reflection/1 for HP) have a setting to turn on the display of every character including nuls and dels. It's called DISPLAY FUNCTIONS. When turned on, all characters will be displayed.
Bill Hassell, sysadmin