LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-12-2011, 01:13 PM   #1
TomOmega
LQ Newbie
 
Registered: Apr 2009
Posts: 11

Rep: Reputation: 1
Question vi, having trouble getting into directory.....


First of all I just want to express my deepest THANKS for everyone's help that you've given me.

Just so you don't think I'm not trying to do it myself, I've gone through vimtutor several times

Here is a copy of what I've tried to do and the error I'm getting:

[TomOmega@Linux ~]$ su
Password:

[root@Linux TomOmega]# cd /etc
[root@Linux etc]# cd /yum
bash: cd: /yum: No such file or directory
[root@Linux etc]# ls
abrt htdig quotatab
acpi httpd rc
adjtime idmapd.conf rc0.d
akonadi init rc1.d
aliases init.d rc2.d
aliases.db inittab rc3.d
alsa inputrc rc4.d
alternatives iproute2 rc5.d
anacrontab issue rc6.d
anthy-conf issue.net rc.d
asound.conf java rc.local
at.deny jvm rc.sysinit
at-spi2 jvm-commmon readahead.conf
audisp jwhois.conf reader.conf.d
audit kde redhat-release
avahi kde4rc report.conf
bash_completion.d kderc report.d
bashrc krb5.conf request-key.conf
blkid ksysguarddrc resolv.conf
bluetooth ld.so.cache rmt
bonobo-activation ld.so.conf rpc
cgconfig.conf ld.so.conf.d rpm
cgrules.conf lftp.conf rsyslog.conf
chkconfig.d libaudit.conf rwtab
ConsoleKit libuser.conf rwtab.d
cron.d localtime samba
cron.daily login.defs sane.d
cron.deny logrotate.conf sasl2
cron.hourly logrotate.d securetty
cron.monthly lvm security
crontab mail selinux
cron.weekly mailcap services
crypttab mail.rc sestatus.conf
csh.cshrc man_db.conf setroubleshoot
csh.login maven setuptool.d
cups mdadm.conf sgml
dbus-1 mime.types shadow
default mke2fs.conf shadow-
depmod.d modprobe.d shells
dhcp motd skel
DIR_COLORS mtab slp.conf
DIR_COLORS.256color mtab.fuselock slrn.rc
DIR_COLORS.lightbgcolor mtools.conf smartd.conf
dnsmasq.conf multipath smolt
dnsmasq.d Muttrc smrsh
dracut.conf Muttrc.local snmp
dracut.conf.d my.cnf sos.conf
dumpdates nanorc sound
elinks.conf netconfig speech-dispatcher
environment NetworkManager ssh
ethers networks ssl
exports nfsmount.conf sssd
favicon.png nsswitch.conf statetab
fedora-release ntp statetab.d
festival ntp.conf stunnel
filesystems obex-data-server sudoers
fonts openal sudoers.d
foomatic openldap sysconfig
fprintd.conf openvpn sysctl.conf
fstab opt systemd
fuse.conf PackageKit system-release
gconf pam.d system-release-cpe
gcrypt pam_pkcs11 terminfo
gdm pango timidity.cfg
GeoIP.conf passwd Trolltech.conf
GeoIP.conf.default passwd- udev
ggz.modules.d pbm2ppa.conf updatedb.conf
ghostscript pcmcia UPower
gimp pinforc urlview.conf
gnome-settings-daemon pki usb_modeswitch.conf
gnome-vfs-2.0 plymouth usb_modeswitch.d
gnupg pm vimrc
gre.d pm-utils-hd-apm-restore.conf virc
GREP_COLORS pnm2ppa.conf virtuoso
group polkit-1 vpnc
group- popt.d warnquota.conf
grub.conf portreserve wgetrc
gshadow ppp wpa_supplicant
gshadow- prelink.cache wvdial.conf
gssapi_mech.conf prelink.conf X11
gtk-2.0 prelink.conf.d xdg
gtk-3.0 printcap xinetd.d
hal profile xml
host.conf profile.d xscreensaver
hosts protocols yp.conf
hosts.allow pulse yum
hosts.deny purple yum.conf
hp quotagrpadmins yum.repos.d

[root@Linux etc]# cd /yum
bash: cd: /yum: No such file or directory
[root@Linux etc]#


As you can see there is a directory called yum, why can't I access it?
 
Old 05-12-2011, 01:19 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Quote:
Originally Posted by TomOmega View Post
[root@Linux etc]# cd /yum
bash: cd: /yum: No such file or directory
[root@Linux etc]#


As you can see there is a directory called yum, why can't I access it?
You are cd-ing to /yum and not to yum. The slash tells cd that it need to change to a directory in the root (/) directory.

If you need to go to /etc/yum you can do that by:
Code:
cd /etc/yum
or
Code:
cd /etc
cd yum
Hope this helps.
 
1 members found this post helpful.
Old 05-12-2011, 08:39 PM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,246

Rep: Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025
Incidentally
Code:
# this logs you in as root, BUT with your orig user's env settings

su

# this logs you in as root with root's env!

su -
 
1 members found this post helpful.
Old 05-13-2011, 09:00 AM   #4
TomOmega
LQ Newbie
 
Registered: Apr 2009
Posts: 11

Original Poster
Rep: Reputation: 1
druuna & chrism01, Thanks you guys, I feel like a total FOOL, yum isn't directory it's a file.

And I do understand the usage of SU, I was just trying anything I could think of, I just need to sit back and take a closer look at what I'm doing. Be looking for more foolish question from me.

You people are AWESOME!!

Last edited by TomOmega; 05-13-2011 at 09:03 AM.
 
  


Reply

Tags
vi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble opening home directory Paul Griesbaum Mandriva 4 07-08-2009 04:18 PM
Samba Home Directory Trouble JeffC1 Linux - Newbie 1 07-04-2008 10:11 AM
trouble setting directory permissions goodolday Linux - General 1 04-26-2005 04:06 PM
Konqueror directory trouble in SuSE 9 uniQ Linux - General 3 04-01-2004 03:28 AM
trouble unlocking a windows directory j-la Linux - Newbie 7 01-08-2004 05:56 PM


All times are GMT -5. The time now is 04:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration