Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Help on creating and saving an alias Post 302780623 by mar85 on Thursday 14th of March 2013 07:20:54 PM
Old 03-14-2013
Thanks RudiC for the reply. I'm a newbie in linux so pardon me if I don't provide enough info. Not sure which shell I'm running but I've run the command:
Code:
echo $shell

And here's the output:
/usr/.../pkgs/tcsh/6.13.00/bin/tcsh

Regarding the above alias error, what can I do to fix it and get it running?
 

10 More Discussions You Might Find Interesting

1. IP Networking

ifconfig: difference between creating logical or alias network interface

Hi guys, I have set up multiple virtual FTP servers on a server through one physical NIC. I believe there are to ways; setting logical or alias ip's. I would like to know what is the difference between setting up a logical ip or setting up an alias ip to a physical network interface? Some links to... (5 Replies)
Discussion started by: zaff
5 Replies

2. UNIX for Dummies Questions & Answers

Creating alias for directory path

I am trying to create an alias for a frequently used directory path by using alias xyz="/proj/dir_name" and then trying to reach a sub-directoy by using cd xyz/abc but I get an error saying " No such file or directory " plz tell me wats wrong with this ... (3 Replies)
Discussion started by: jasjot31
3 Replies

3. Shell Programming and Scripting

help needed with creating challenging bash script with creating directories

Hi, Can someone help me with creating a bash shell script. I need to create a script that gets a positive number n as an argument. The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies

4. Red Hat

Live-cd Saving changes

Hi all, firstly apologies if this is in the wrong category. I have been making livecds (fedora based) and to change eg the background i use below in the ks file. this works fine, however when i install the livecd it loses the changes. How can i make the changes so that they stay when... (5 Replies)
Discussion started by: davewilks
5 Replies

5. Solaris

Creating Alias for FILE

Hello, I need the command to create alias for a file "FILE" (NOT for commands) ? And Is there any difference between creating alias for files and creating alias for commands ? For info, i'm using Solaris 8 Thx, http://www.unix.com/images/misc/progress.gif (5 Replies)
Discussion started by: newpromo
5 Replies

6. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

If one: $ find -name 'some expression' -type f > newfile and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory. I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies

7. Solaris

Saving to usb

Greetings. I am trying to save a file to a usb from solaris 10. If I do rmformat, I see my usb, but can't find a location to tell things to save to or figure out how to save/view the files on the disk. Any help/thoughts/etc would be appreciated. Thanks! ~K (20 Replies)
Discussion started by: kuriosity_prime
20 Replies

8. Shell Programming and Scripting

Creating .../ alias in bash

I want to create an alias as follows but is not working alias ../='cd ../' (3 Replies)
Discussion started by: kristinu
3 Replies

9. Homework & Coursework Questions

Creating a .profile, displaying system variables, and creating an alias

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Here is what I am supposed to do, word for word from my assignment page: 1. Create/modify and print a... (2 Replies)
Discussion started by: Jagst3r21
2 Replies

10. OS X (Apple)

Having trouble creating an alias for grep

Hi, I'm using Mac 10.9.1. I would like to create an alias for grep so that it won't print out messages like "grep: /Users/davea/workspace/myproject/subdir/: Is a directory" all the time. So in my terminal, I opened ~/.profile and entered alias grep='grep -s' However, when I close and... (5 Replies)
Discussion started by: laredotornado
5 Replies
runat(1)							   User Commands							  runat(1)

NAME
runat - execute command in extended attribute name space SYNOPSIS
/usr/bin/runat file [command] DESCRIPTION
The runat utility is used to execute shell commands in a file's hidden attribute directory. Effectively, this utility changes the current working directory to be the hidden attribute directory associated with the file argument and then executes the specified command in the bourne shell (/bin/sh). If no command argument is provided, an interactive shell is spawned. The environment variable $SHELL defines the shell to be spawned. If this variable is undefined, the default shell, /bin/sh, is used. The file argument can be any file, including a directory, that can support extended attributes. It is not necessary that this file have any attributes, or be prepared in any way, before invoking the runat command. OPERANDS
The following operands are supported: file Any file, including a directory, that can support extended attributes. command The command to be executed in an attribute directory. ERRORS
A non-zero exit status will be returned if runat cannot access the file argument, or the file argument does not support extended attributes. USAGE
See fsattr(5) for a detailed description of extended file attributes. The process context created by the runat command has its current working directory set to the hidden directory containing the file's extended attributes. The parent of this directory (the ".." entry) always refers to the file provided on the command line. As such, it may not be a directory. Therefore, commands (such as pwd) that depend upon the parent entry being well-formed (that is, referring to a direc- tory) may fail. In the absence of the command argument, runat will spawn a new interactive shell with its current working directory set to be the provided file's hidden attribute directory. Notice that some shells (such as zsh and tcsh) are not well behaved when the directory parent is not a directory, as described above. These shells should not be used with runat. EXAMPLES
Example 1: Using runat to list extended attributes on a file example% runat file.1 ls -l example% runat file.1 ls Example 2: Creating extended attributes example% runat file.2 cp /tmp/attrdata attr.1 example% runat file.2 cat /tmp/attrdata > attr.1 Example 3: Copying an attribute from one file to another example% runat file.2 cat attr.1 | runat file.1 "cat > attr.1" Example 4: Using runat to spawn an interactive shell example% runat file.3 /bin/sh This spawns a new shell in the attribute directory for file.3. Notice that the shell will not be able to determine what your current direc- tory is. To leave the attribute directory, either exit the spawned shell or change directory (cd) using an absolute path. Recommended methods for performing basic attribute operations: display runat file ls [options] read runat file cat attribute create/modify runat file cp absolute-file-path attribute delete runat file rm attribute permission changes runat file chmod mode attribute runat file chgrp group attribute runat file chown owner attribute interactive shell runat file /bin/sh or set your $SHELL to /bin/sh and runat file The above list includes commands that are known to work with runat. While many other commands may work, there is no guarantee that any beyond this list will work. Any command that relies on being able to determine its current working directory is likely to fail. Examples of such commands follow: Example 5: Using man in an attribute directory example% runat file.1 man runat getcwd: Not a directory Example 6: Spawning a tcsh shell in an attribute directory example% runat file.3 /usr/bin/tcsh tcsh: Not a directory tcsh: Trying to start from "/home/user" A new tcsh shell has been spawned with the current working directory set to the user's home directory. Example 7: Spawning a zsh shell in an attribute directory example% runat file.3 /usr/bin/zsh example% While the command appears to have worked, zsh has actually just changed the current working directory to '/'. This can be seen by using /bin/pwd: example% /bin/pwd / ENVIRONMENT VARIABLES
SHELL Specifies the command shell to be invoked by runat. EXIT STATUS
The following exit values are returned: 125 The attribute directory of the file referenced by the file argument cannot be accessed. 126 The exec of the provided command argument failed. Otherwise, the exit status returned is the exit status of the shell invoked to execute the provided command. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
open(2), attributes(5), fsattr(5) NOTES
It is not always obvious why a command fails in runat when it is unable to determine the current working directory. The errors resulting can be confusing and ambiguous (see the tcsh and zsh examples above). SunOS 5.10 22 Jun 2001 runat(1)
All times are GMT -4. The time now is 06:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy