Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Changing directory with a script Post 302414774 by Scrutinizer on Wednesday 21st of April 2010 02:43:51 AM
Old 04-21-2010
Your directory location gets lost when you leave the script's subshell. Tou can either source the script as explained above or use an alias that you put in your .profile
Code:
$ alias cdod2='cd /opt/xxx/dir1/dir2;pwd'
$ cdod2
/opt/xxx/dir1/dir2
$

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Changing directory on Unix

Hi, Can you please help ? I work on SCO Unix Open server Rel. 5. User root on Unix can change/view/modify any files belonging to any user on a file system. Is there any way where I can prevent non-root users to change thier directories to other non-root users area. for eg. There are 2 users... (3 Replies)
Discussion started by: taher_n
3 Replies

2. Programming

changing directory on server

hi, I'm doing to some simple socket programming. I have a client that connects to the server and request stuff. For example, if the client type in "ls", that command will be sent to the server and the server will send back the ls information the client requested. Similarly, if the client type... (1 Reply)
Discussion started by: bb00y
1 Replies

3. UNIX for Dummies Questions & Answers

Changing directory through script

Hi Friends ! I want to change my current directory through a script. I am running the script say, from /home/proj directory. The script is like this : #!/usr/bin/sh cd module/pack/data once i run the script, i am still in /home/proj directory only. My problem is, i dont want to type... (5 Replies)
Discussion started by: mrgubbala
5 Replies

4. Red Hat

/root directory - date keeps changing???

I recently activated tripwire on my redhat 9 box. Tripwire reports that the time and date of the directory /root is being modified. Also the file inside root called .viminfo is also changing checksum and being modified. I tried to google some answers but had no luck so far. Is this normal... (1 Reply)
Discussion started by: Alux
1 Replies

5. Windows & DOS: Issues & Discussions

Changing Directory Using SFU

Just installed SFU in my PC running under Windows XP Pro. Could someone tell us how to change directory and to its subdirectories either by Korn Shell or C Shell? I tried, cd f:\ or chdir f:\ but it didn't work. (1 Reply)
Discussion started by: ilak1008
1 Replies

6. Shell Programming and Scripting

Changing home directory

Hello All: I have an LDAP server that is used for authentication. Now the home directory id set to : /export/home/user1 . But I am logging in to different machines Solaris, Linux. The problem is I want the home directory to change depending on the os version (e.g. /export/home/user1/linux). Can... (1 Reply)
Discussion started by: disturbe_d
1 Replies

7. UNIX for Dummies Questions & Answers

changing directory quickly without cd ..

Hi, I am in /home/development/project/abc directory. Now I want to remove one file which is kept in /trial/dev/<file> directory. I would like to do it in one command. I tried changing directory in one command like: pwd /home/development/project/abc cd ~/trial/dev/ bash: no command... (2 Replies)
Discussion started by: palak08
2 Replies

8. UNIX for Dummies Questions & Answers

changing directory permissions

Hi, Im getting this annoying problem on file permission when I copy a folder to a mounted external directory. the files inside the copied folders become all executable. I tried to search for ways how to undo the permission over the web but to no avail. tried this one but it doesnt change a... (2 Replies)
Discussion started by: ida1215
2 Replies

9. Shell Programming and Scripting

changing multiple directory names

Hi guys, I have lots of files that look like: ABC.packed.dir DEF.packed.dir GHI.packed.dir etc... I would like them to have more of the usual naming convention ABC DEF GHI etc... so I was thinking that I could: (2 Replies)
Discussion started by: atjurhs
2 Replies

10. Shell Programming and Scripting

Prevent the user from changing his directory

Hi could some let me know how to prevent user from changing his home directory....... Thanks in advance.... (1 Reply)
Discussion started by: Revanth547
1 Replies
VIFM(1) 							   File Manager 							   VIFM(1)

NAME
vifm - a ncurses based file manager with vi like keybindings SYNOPSIS
vifm [ options ] [ dir1 [ dir2 ]] DESCRIPTION
This manual page documents briefly the vifm file manager. This manual page was written for the Debian distribution because the original program does not have a manual page. vifm is a ncurses based file manager with vi like keybindings. If you use vi, vifm gives you complete keyboard control over your files without having to learn a new set of commands. For full documentation, visit the doc directory. A better man page may follow later. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. The optional argument dir1 opens an initial directory in the left pane, the dir2 another one for the right pane respectively. If one or both are missing, the current working directory is used. --help Show summary of options. --version Show version of program. SEE ALSO
vi(1), AUTHOR
This manual page was written by Edelhard Becker <becker@edelhard.de>, for the Debian GNU/Linux system (but may be used by others). Edelhard Becker August 27, 2002 VIFM(1)
All times are GMT -4. The time now is 01:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy