LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-14-2011, 04:19 PM   #1
d4v3
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Rep: Reputation: 0
how to get acess to a directory


i did the next error

# mv CZWM7EN.tar ./osagent

and i can not get inside the directory

# cd osagent
ksh: osagent: not found.

how can i get inside the directory or remove it ?


thanks in advance
 
Old 06-14-2011, 05:41 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Post the output of

Code:
ls -al
from the directory that you moved it from.
 
Old 06-14-2011, 05:58 PM   #3
d4v3
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Original Poster
Rep: Reputation: 0
ls -la output

Quote:
Originally Posted by andrewthomas View Post
Post the output of

Code:
ls -al
from the directory that you moved it from.

# ls -al
total 11901952
drwxr-xr-x 8 8534 101 4096 Jun 14 17:55 .
drwxr-xr-x 6 root system 256 Jun 14 17:29 ..
-rw------- 1 root system 241729536 Jun 14 17:55 C1MP9EN_ITM_Tools.tar
-rw-r----- 1 root system 1987693959 Jun 14 15:59 C1MP9EN_ITM_Tools.tar.gz
-rw-r----- 1 root system 22251520 Jun 06 15:04 CZ8LGEN_Gateway4ODBC.tar
-rw-r----- 1 root system 3481600 Jun 06 15:12 CZR9DEN.tar
-rw-r----- 1 root system 358993920 Jun 06 13:39 CZW01ML.tar
-rw-r----- 1 root system 4321280 Jun 06 15:03 CZW72EN_EIF.tar
-rw-r----- 1 root system 124395520 Jun 06 15:09 CZW91EN.tar
drwxr-xr-x 4 root system 256 Jun 14 14:24 EIF
-rw-r--r-- 1 root system 3348254720 Jun 14 15:44 osagent
-rw-r----- 1 root system 2570240 Jun 14 15:43 Reporter_CZ8KPEN.tar
drwxr-xr-x 2 root system 256 Jun 06 12:19 lost+found
drwxr-xr-x 4 root system 256 Jun 14 14:23 nonnativ
drwxr-xr-x 4 root system 256 Jun 14 14:55 odbc
drwxr-xr-x 4 root system 256 Jun 14 15:45 reporter
drwxr-xr-x 2 root system 256 Jun 14 17:55 tools
 
Old 06-14-2011, 06:00 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,133
Blog Entries: 2

Rep: Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836
You tried to move a file into a non-existent directory. In this case the mv-command works like a renaming tool, you have just renamed the file to osagent.
 
Old 06-14-2011, 06:15 PM   #5
d4v3
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Original Poster
Rep: Reputation: 0
reply

Quote:
Originally Posted by TobiSGD View Post
You tried to move a file into a non-existent directory. In this case the mv-command works like a renaming tool, you have just renamed the file to osagent.
ok, but i tried to rename it and could not

# mv ./osagent os.tar
mv: 0653-401 Cannot rename ./osagent to os.tar:
A file or directory in the path name does not exist.
# mv osagent os.tar
mv: 0653-401 Cannot rename osagent to os.tar:
A file or directory in the path name does not exist.
#
 
Old 06-14-2011, 06:21 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,133
Blog Entries: 2

Rep: Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836
Are you in the right directory?
 
Old 06-14-2011, 06:33 PM   #7
d4v3
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Original Poster
Rep: Reputation: 0
reply

Quote:
Originally Posted by TobiSGD View Post
Are you in the right directory?
these are the commands i tried and the right directory...

# pwd
/opt/IBM/stage
# ls
C1MP9EN_ITM_Tools.tar CZW91EN.tar nonnativ
CZ8LGEN_Gateway4ODBC.tar EIF odbc
CZR9DEN.tar osagent reporter
CZW01ML.tar Reporter_CZ8KPEN.tar tools
CZW72EN_EIF.tar lost+found
# mv osagent os.tar
mv: 0653-401 Cannot rename osagent to os.tar:
A file or directory in the path name does not exist.
#
 
Old 06-14-2011, 07:00 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Looks like there may be an invisible (ctrl) char in the 'osagent' file name. Try with wildcard(s) eg
Code:
mv *osagent* os.tar
Another option is to temporarily move all the other files elsewhere, then cd up one dir and try
Code:
mv dirname/* newname
 
Old 06-14-2011, 07:09 PM   #9
d4v3
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Original Poster
Rep: Reputation: 0
Solution reply

Quote:
Originally Posted by chrism01 View Post
Looks like there may be an invisible (ctrl) char in the 'osagent' file name. Try with wildcard(s) eg
Code:
mv *osagent* os.tar
Another option is to temporarily move all the other files elsewhere, then cd up one dir and try
Code:
mv dirname/* newname
yeah i could change the name with

mv *osagent* os.tar

which characters are invisibles for a file name ?


thanks everybody
 
Old 06-14-2011, 07:44 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
The filename rules are documented somewhere ( eg http://www.cyberciti.biz/faq/linux-file-names/ ), but personally I recommend restricting yourself to letters, numbers, underscores and periods.
Ctrl chars (and spaces) will be invisible to the ls cmd.
http://www.asciitable.com/

Spaces are also bad because the default in *nix is to use whitespace as the default param separator for most (all ?) cmds.
YHBW
 
Old 06-14-2011, 08:34 PM   #11
d4v3
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Original Poster
Rep: Reputation: 0
Solution reply

Quote:
Originally Posted by chrism01 View Post
The filename rules are documented somewhere ( eg http://www.cyberciti.biz/faq/linux-file-names/ ), but personally I recommend restricting yourself to letters, numbers, underscores and periods.
Ctrl chars (and spaces) will be invisible to the ls cmd.
http://www.asciitable.com/

Spaces are also bad because the default in *nix is to use whitespace as the default param separator for most (all ?) cmds.
YHBW
ok i see using some charcaters complicate the use of some files and directories

thanks!!!
 
  


Reply


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
Acess by PC name instead of IP address kolment Linux - Networking 5 11-16-2007 01:42 PM
How can i acess yugandhar Programming 1 06-14-2006 02:34 AM
Can not acess the internet MurX Linux - Software 6 11-29-2005 09:08 PM
root acess? SnowSurfAir Linux - Software 12 08-08-2003 04:27 PM
user acess spacific to a directory using bash how to x2000koh Programming 2 07-21-2003 10:34 PM


All times are GMT -5. The time now is 07:52 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration