LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-11-2006, 12:17 PM   #1
joegumbo
Member
 
Registered: Sep 2006
Distribution: MX-16 Modified using TDE
Posts: 239

Rep: Reputation: 32
Java folders - data loss


Hi,

I'm taking an "Intro to Java Programming" class, and I'm running into an issue in Slackware and other Linux'. Our instructions are....

Write the source code for ProjectWhatever and save as ProjectWhatever.java

Save ProjectWhatever.java in a Folder also named ProjectWhatever.java

Save the ProjectWhatever.java Folder in another Folder named Student_Name_chp_num.

Compress the Student_Name_chp_num Folder into Student_Name_chp_num.zip form.

Use Blackboard's "Digital Drop Box" to turn in the assignment.

In SuSE, I would run into an issue where after zipping, the ProjectWhatever.java Folder would be sometimes empty after unzipping.

However, I'm now using Slackware, and now I'm running into a different issue....

After I zip the Student_Name_chp_num Folder, then unzip to verify the contents, the ProjectWhatever.java File in the ProjectWhatever.java Folder loses the .java extension and the coffee cup logo. It becomes a file with no extension at all in Slackware. I'm asked what program I would like to use to open it. At least I'm not losing the whole thing like I was in SuSE, but, these assignments are for a grade and I need everything in it's place.

The teacher teaching this class is Windows only and I don't think he would welcome questions dealing with another OS or problems associated with it. I suppose I should be grateful points aren't being deducted because I'm using Linux and a published prerequisite for the course is the Windows OS.

Thanks,
-Joe
 
Old 10-11-2006, 12:36 PM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Works fine here:
Code:
[~/tmp/] mkdir Student_Name_chp_num
[~/tmp/] cd Student_Name_chp_num/
[~/tmp/Student_Name_chp_num/] mkdir ProjectWhatever.java
[~/tmp/Student_Name_chp_num/] cd ProjectWhatever.java/
[~/tmp/Student_Name_chp_num/ProjectWhatever.java/] vim ProjectWhatever.java
[~/tmp/Student_Name_chp_num/ProjectWhatever.java/] cd ~/tmp
[~/tmp/] zip -R Student_Name_chp_num.zip Student_Name_chp_num/
[~/tmp/] rm -R Student_Name_chp_num/
[~/tmp/] unzip Student_Name_chp_num.zip
[~/tmp]$ du -hab ./Student_Name_chp_num                                                     
33      ./Student_Name_chp_num/ProjectWhatever.java/ProjectWhatever.java
121     ./Student_Name_chp_num/ProjectWhatever.java
209     ./Student_Name_chp_num
Note: I added a silly code to the .java file that takes 33 bytes.
Also take a look at zip's parameters, it can convert Linux EOFs to DOS/Windows EOFs when zipping, that will save your teacher a headache.

Edit: You should tell us which program you're using to compress the directory.

Last edited by gbonvehi; 10-11-2006 at 12:40 PM.
 
Old 10-11-2006, 12:45 PM   #3
joegumbo
Member
 
Registered: Sep 2006
Distribution: MX-16 Modified using TDE
Posts: 239

Original Poster
Rep: Reputation: 32
Hi gbonvehi!

Then maybe the problem is that I'm not doing this from the command line, but I'm using KDE. (Right Click, New Folder, Click and Drag, etc.)

Thanks,
-Joe
PS
I'm simply using KDE, Right Clicking and choosing Compress>Compress as...>Student_Name_chp_num.zip. I'm using jGRASP with Java Version 1.5.0_04
I'm also working in /home/user, not /tmp (I don't know if this matters)

Last edited by joegumbo; 10-11-2006 at 01:46 PM.
 
  


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
Partition without Data Loss SirJinX Linux - Software 9 08-26-2006 12:25 AM
LVM - possible data loss zdenisl Linux - Software 0 05-11-2006 06:21 PM
PDA data loss jollyjoice Linux - Hardware 0 03-20-2006 12:54 PM
help prevent DATA LOSS! coolblue Linux - Newbie 2 03-14-2005 05:16 AM
Help!! loss of data transfer cabinetcrafter Mandriva 0 05-15-2004 10:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:56 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