I can open these files, and search for what I need, but I am lost when it comes time to make them a. Z file again. I know its just a silly command I am missing. Can you please help? Z Z file. Perhaps it's not in your path? I want to be good, is that not enough? Sorry - that's based on Solaris 8. This raises an interesting question - how did they get compressed in the first place - and how are you uncomressing them?
What command do you use to 'open' the file? Ceci n'est pas une signature Columb Healy. What version of Unix? Red Flag This Post Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework. Close Box. Log In Come Join Us! Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden. Z file Compression thread Forum.
Creating a. Z file Compression Creating a. Z file Compression Please forgive me, I am unfamiliar with the Unix world. Z file Compression Perhaps it's not in your path? RE: Creating a. Method 2. Replace newfilename with whatever you'd like to call your new file. This opens a new blank line. Type some text. Anything you type here will be added to the file.
You'll need to be on a blank line to finish the cat command. This saves the file to the current directory with the name you entered. Method 3. You'll want to be in the directory where you'd like to store your new file before opening the text editor.
This opens the Vi or Vim, depending on the version of Unix you're using text editor. To edit a specific text file with Vi, type vi filename' instead. Press i to enter input mode. Vi has two modes—insert mode and command mode. You must be in input mode to type text into the new file. Type some text optional. If you want to create a blank file you can just skip this step. Otherwise, type any text you wish to add now. You can't use your mouse or the arrow keys in Vi. If you make a mistake when typing, you'll need to run a command in command mode.
Press Esc to make the arrow keys available, use them to move the cursor to the location of the mistake, and then use any of these commands: x deletes the character under the cursor.
This will automatically put you back into input mode after use. See How to Learn Vi to learn about more Vi commands. Press Esc when you're ready to save the file. This places you into command mode. Replace newfilename with the name of the file. This saves the file to the current directory. If you want to keep editing the file, press i to go back into input mode.
The next time you want to save the file, you can just type :w in command mode no file name necessary. This returns you to the command line. Method 4. Use cd to change to the desired directory optional. You'll be using the cp copy command to copy an existing file to another new file.
You'll either need to move to the directory that contains the original file or know its full path. Replace originalfile with the name of the file you want to copy, and newfile with the name of the desired new file. This creates a new file that contains the contents of the old file. Use the full path to the file if you're working with files outside of the current working directory e.
Include your email address to get a message when this question is answered. You Might Also Like How to. How to. About This Article. Written by:. Nicole Levine, MFA. Co-authors: Updated: January 13,
0コメント