LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 11-14-2005, 12:27 AM   #1
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Rep: Reputation: 15
Help help, I can't do anything with my file


Hi.

I created 1 file and named it "Warning"
# cat > Warning
Test content ... bla bla bla

<ctrl - C>

Then, I rename it to "-Warning"
# mv Warning -Warning

After done, I could do anything with it. Can not delete, can not read or rename it. When I execute these commands to do, they think -Warning means parameter, not file name
 
Old 11-14-2005, 01:29 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Use "./Warning" to name it.
 
Old 11-14-2005, 03:54 AM   #3
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Original Poster
Rep: Reputation: 15
Does it look like to execute file?

I tried:
Code:
-bash-3.00# mv "./Warning" warning
mv: cannot access ./Warning
-bash-3.00# mv "./-Warning" warning
mv: cannot access ./-Warning
-bash-3.00#  "./-Warning" warning
-bash: ./-Warning: No such file or directory
-bash-3.00# ./Warning
-bash: ./Warning: No such file or directory
-bash-3.00# ls
-Warning.txt  Misc-Temp     Projects
Ebooks        Products      Softwares
-bash-3.00#
 
Old 11-14-2005, 04:10 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Your file is not named "-Warning" as you stated, but "-Warning.txt" ...

Last edited by jlliagre; 11-14-2005 at 04:45 AM.
 
Old 11-14-2005, 06:13 AM   #5
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Original Poster
Rep: Reputation: 15
Omg, i forgot this!!!! What fool I was. Sorry jlliagre
 
  


Reply



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
forrtl: severe (47): write to READONLY file, unit 5, file /dev/pts/1 terrence Programming 1 10-01-2005 10:22 PM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM
Is arrangement of file systems will differ if we copy a file from FAT 32 to ext 3 ? anindyanuri Linux - Software 2 02-20-2005 11:39 AM
Yum update complains missing file (broken dep), but file can be located. davidas Linux - Software 0 03-27-2004 09:11 PM
How to play a media file/ video file/mp3 file recorded in harddisk/cd-rom arindam Linux - Newbie 2 09-05-2003 10:31 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 04:35 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
Open Source Consulting | Domain Registration