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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-12-2001, 05:47 PM
|
#1
|
Member
Registered: Apr 2001
Location: Pensacola, Florida
Distribution: Red Hat 9
Posts: 42
Rep:
|
How can I concatenate two binary files. They were originally split with a file-splitter so that they would fit on floppies. The file-splitter created a batch file to put them back together. The batch file uses this command: "copy /B file1 + file2 file3" (without quotes). I looked at the man page for cat, but I didn't see any parameters to use for binary files. What should I do?
|
|
|
05-12-2001, 05:53 PM
|
#2
|
Member
Registered: Apr 2001
Location: Pensacola, Florida
Distribution: Red Hat 9
Posts: 42
Original Poster
Rep:
|
The whole reason I got into this mess is that I can't get online with Linux (My parents use AOL ), and because I can't access my DOS disk from Linux. If anyone knows of a free ISP for Linux or a way to access my DOS disk, please help. Please explain in as simple terms as you can because I'm new to Linux.
|
|
|
05-13-2001, 04:26 PM
|
#3
|
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368
Rep:
|
Not sure about the concatenating, but:
First, think back - when you repartitioned your HD, did you erase your Windows partition(s)? If the answer is yes, then I'm affraid that you've lost all of the files that were under Windows. If the answer is no, then don't stress.
Using Konqueror (the program that behaves like Windows Explorer) move to your '/mnt' directory. Are there any subdirectories called 'windows' or 'win_c' or the like? You should already have a 'cdrom', 'floppy' and 'disk' (I'm not sure what this last one's for). If you have, and it has a padlock over it, log in as root. If you can now access it, then there you go. It's here!
If there aren't any subdirectories called 'windows' or 'win_c' then make one. Make sure you're logged in as root. Open a terminal window and type:
mount vfat /hda1 /mnt/windows
You should be able to access it now. This is only a temporary measure, you need to read up about your 'fstab' for a more permanent solution. Either look for a HowTo on 'fstab' or type 'man fstab' from a terminal window.
Can't be of anymore help tonight, my university computer turns itself off at 22:30 GMT (4 mins time).
Good luck anyway.
|
|
|
05-13-2001, 05:56 PM
|
#4
|
Member
Registered: Apr 2001
Location: Pensacola, Florida
Distribution: Red Hat 9
Posts: 42
Original Poster
Rep:
|
Ok, I figured out how to access my Windows disk. I used linuxconf instead of your mount command so it leaves an icon on my desktop to automatically mount and open gmc, but I still want to know how I can concatenate binary files, and I'm still looking for a free ISP.
|
|
|
05-14-2001, 09:44 AM
|
#5
|
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368
Rep:
|
I'm no great programmer (hence the 'Basic Under Linux' thread) but I believe that this should work:
Copy the 1st bin to a new one and then append the second to it, like:
cp filea.bin newfile.bin
cat fileb.bin >> newfile.bin
The double '>>' is important. A single '>' will overwrite the contents of 'newfile.bin' with 'fileb.bin', so you won't have achieved much!
Don't forget to change the file permissions so that you can run the 'newfile.bin'.
|
|
|
05-14-2001, 02:10 PM
|
#6
|
Member
Registered: Apr 2001
Location: Pensacola, Florida
Distribution: Red Hat 9
Posts: 42
Original Poster
Rep:
|
Ok, I know that doesn't work in DOS, but maybe Linux does it differently. With DOS you will automatically get an EOF code at the end of the FIRST binary file, along with the EOF code at the end of the end of the second (creating a binary with 2 EOF codes). If I remember correctly it isn't good to even have 1 EOF code in a binary file, but I'm not sure how Linux treats ascii and binary files, so that could work.
|
|
|
05-14-2001, 02:13 PM
|
#7
|
Member
Registered: Apr 2001
Location: Pensacola, Florida
Distribution: Red Hat 9
Posts: 42
Original Poster
Rep:
|
The DOS command is COPY /B FILE1 + FILE2 FILE3. The /B switch causes it to copy in binary mode, but Linux might already copy in binary mode by default.
|
|
|
All times are GMT -5. The time now is 11:06 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|