linux question

Posted on 2004-10-28
Last Modified: 2013-12-16
Hi all

Can anyone tell me the differance between

1) ls –ax > fil1  

2) ls –ax >> fil1

Thanks davy
Question by:davy999
    LVL 40

    Accepted Solution

    The first creates a new output file for the results and the second appends the output to a file (creating the file if necessary).
    LVL 44

    Expert Comment

    by:Karl Heinz Kremer
    In addition to what jlevie said, the first one will overwrite a file named fil1, so you will lose the original file contents.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now