Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the function:

function >> file.txt

this creates the file.txt in my current directory. I have a folder log in the same directory, how would I request file.txt to be created in my log file (a directory higher)? I tried:

function >> log/file.txt

and am unsure why this didn't work for me

share|improve this question
up vote 2 down vote accepted

If the "same directory" you mention is up one directory, then use

function >> ../Log/file.txt

.. refers to up one directory, and . refers to the current directory. Read up on all this in a bash tutorial

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .