General enquery abt the path in linux server.
hi,
Is there any method to go to the path without entering the CD command in linux. Eg:/]# bin :like this /bin]# without entering cd bin |
Why? What's purpose of doing this? The cd command stands for change directory and is build for purpose of changing the directory.
|
hi,
my intention that, we can change the path very easily. no need to enter the whole path, were the file is existin i saw somewhere that, without enterin the cd/whole path they changed the path is there any scriptin for that? can we switch from one t other without usin cd/whole command..? like====cd home/bin/crbt/cfg can we go to cfg directly without using all these ?? |
See 'man bash' about "CDPATH" ?
|
I use alias for quick directory change. following lines i have inserted in '/etc/profile' and '/etc/bashrc'
Code:
alias cdkvm="cd /var/lib/libvirt/images" Code:
$ cd - |
Quote:
|
Quote:
Code:
[root@srv ~]# export CDPATH=$CDPATH:/etc:/var Thanks. |
OK. I resolved the problem.
The problem was Code:
[root@srv]# find /var /etc -type d -name images -print 2>/dev/null | wc -l Code:
export CDPATH=$CDPATH:/var/lib/libvirt:/var/ftp:/var/www:/etc/yum.repos.d:/etc/sysconfig |
@linishjacob88:
In addition to setting CDPATH variable, you can also learn about types of paths i.e. absolute and relative paths (see here). Code:
~$ pwd Code:
~$ cd /home/user |
Hi,
Thanks all for your valued information.@unSpawn,@mddesai,@shivaa....Let me try.. |
All times are GMT -5. The time now is 08:02 AM. |