Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk
To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk
You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."
Today's Topics:
1. Are all Nano's the same!? (Peter Hemmings)
2. Re: Are all Nano's the same!? (David Smith)
3. Re: Are all Nano's the same!? (David Smith)
4. Re: Are all Nano's the same!? (Nigel Sollars)
5. Re: Are all Nano's the same!? (Shane McEwan)
6. Re: Are all Nano's the same!? (Peter Hemmings)
----------------------------------------------------------------------
Message: 1
Date: Thu, 04 Dec 2014 13:48:35 +0000
From: Peter Hemmings <peter@hemmings.eclipse.co.uk>
To: bristol@mailman.lug.org.uk
Subject: [bristol] Are all Nano's the same!?
Message-ID: <54806633.3050106@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi,
It's a long time since I dabbled with Cron using my usual nano editor
but I am having problems with using it on my Pi.
I have never had problems on Fedora if I want to edit a file that is not
there, it creates a new one and I save it.
On the Pi Nano reports no such file/directory and I cannot see if there
is any config I can do to make it the same as on my Fedora, which is
what is assumed on my DHT11 info link on the other thread.
Are not all Nano's the same!?
Regards
--
Peter H
------------------------------
Message: 2
Date: Thu, 4 Dec 2014 14:06:16 +0000
From: David Smith <David.Smith@imgtec.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Are all Nano's the same!?
Message-ID:
<15A9D35B5490FC49AC0524AE3A085F0874F67F@BRMAIL01.br.imgtec.org>
Content-Type: text/plain; charset="us-ascii"
> From: bristol-bounces@mailman.lug.org.uk [mailto:bristol-
> bounces@mailman.lug.org.uk] On Behalf Of Peter Hemmings
> It's a long time since I dabbled with Cron using my usual nano editor but I am
> having problems with using it on my Pi.
>
> I have never had problems on Fedora if I want to edit a file that is not there,
> it creates a new one and I save it.
>
> On the Pi Nano reports no such file/directory and I cannot see if there is any
> config I can do to make it the same as on my Fedora, which is what is
> assumed on my DHT11 info link on the other thread.
>
> Are not all Nano's the same!?
I think it should still work the same. Some guesses as to why you might be getting "No such file or directory":
1. Does the current working directory exist?
2. Is the file you're trying to edit a symbolic link to a file that doesn't exist?
3. Do you have permission to create a file in the directory? Perhaps it's trying to create the file, failing, and then trying to open it which is producing the "No such file or directory" error - a bad error I know, but could be possible...
4. Perhaps it's trying to load a nanorc file from somewhere and that's the cause of the "No such file or directory"?
In these cases, if there's nothing obvious in the error message, I often resort to using "strace":
strace -o <logfile_name> [command]
For example:
strace -o /tmp/foobar.log nano /etc/myfile.cfg
This will run "nano /etc/myfile.cfg" and produce a log of all the system calls (file accesses, screen input/output, etc.) in "/tmp/foobar.log". You can look at this (using "less") to try to determine what file it's trying to access when it gets "No such file or directory"
HTH...
------------------------------
Message: 3
Date: Thu, 4 Dec 2014 14:09:24 +0000
From: David Smith <David.Smith@imgtec.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Are all Nano's the same!?
Message-ID:
<15A9D35B5490FC49AC0524AE3A085F0874F696@BRMAIL01.br.imgtec.org>
Content-Type: text/plain; charset="us-ascii"
From: bristol-bounces@mailman.lug.org.uk [mailto:bristol-
bounces@mailman.lug.org.uk] On Behalf Of Peter Hemmings
> On the Pi Nano reports no such file/directory and I cannot see if there is any
> config I can do to make it the same as on my Fedora, which is what is
> assumed on my DHT11 info link on the other thread.
Some other thoughts:
Can you edit pre-existing files with nano?
If you can, then how about using "touch" to create the empty file and then editing it?
------------------------------
Message: 4
Date: Thu, 4 Dec 2014 09:20:48 -0500
From: Nigel Sollars <nsollars@gmail.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Are all Nano's the same!?
Message-ID:
<CAG6aBkUri7GtFwd2x+Q++V+wHfP47enNePfVkPxVD_ytyeauTQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Since this is cron, does crontab -e not work?
On Thu, Dec 4, 2014 at 9:09 AM, David Smith <David.Smith@imgtec.com> wrote:
> From: bristol-bounces@mailman.lug.org.uk [mailto:bristol-
> bounces@mailman.lug.org.uk] On Behalf Of Peter Hemmings
> > On the Pi Nano reports no such file/directory and I cannot see if there
> is any
> > config I can do to make it the same as on my Fedora, which is what is
> > assumed on my DHT11 info link on the other thread.
>
> Some other thoughts:
>
> Can you edit pre-existing files with nano?
>
> If you can, then how about using "touch" to create the empty file and then
> editing it?
>
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol
>
--
?Science is a differential equation. Religion is a boundary condition.?
Alan Turing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20141204/377b12c2/attachment-0001.html>
------------------------------
Message: 5
Date: Thu, 04 Dec 2014 14:34:39 +0000
From: Shane McEwan <shane@mcewan.id.au>
To: bristol@mailman.lug.org.uk
Subject: Re: [bristol] Are all Nano's the same!?
Message-ID: <548070FF.2030101@mcewan.id.au>
Content-Type: text/plain; charset=utf-8
On 04/12/14 13:48, Peter Hemmings wrote:
> It's a long time since I dabbled with Cron using my usual nano editor
> but I am having problems with using it on my Pi.
Are you trying to edit the cron file directly? The recommended way to
edit the cron file is with the "crontab" command:
crontab -e
You should be prompted for your favourite editor the first time you run
it. If not, try:
EDITOR=nano crontab -e
I can't think of any reason why nano wouldn't create a non-existant file
so I suspect there's some external reason why nano is failing. Try
creating the file with 'touch' first to see if that works.
Shane.
------------------------------
Message: 6
Date: Thu, 04 Dec 2014 14:53:53 +0000
From: Peter Hemmings <peter@hemmings.eclipse.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Are all Nano's the same!?
Message-ID: <54807581.4050006@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
On 04/12/14 14:20, Nigel Sollars wrote:
> Since this is cron, does crontab -e not work?
>
> On Thu, Dec 4, 2014 at 9:09 AM, David Smith <David.Smith@imgtec.com
> <mailto:David.Smith@imgtec.com>> wrote:
>
> From: bristol-bounces@mailman.lug.org.uk
> <mailto:bristol-bounces@mailman.lug.org.uk> [mailto:bristol-
> <mailto:bristol->
> bounces@mailman.lug.org.uk <mailto:bounces@mailman.lug.org.uk>] On
> Behalf Of Peter Hemmings
> > On the Pi Nano reports no such file/directory and I cannot see if there is any
> > config I can do to make it the same as on my Fedora, which is
> what is
> > assumed on my DHT11 info link on the other thread.
>
> Some other thoughts:
>
> Can you edit pre-existing files with nano?
>
Seems I can
If you can, then how about using "touch" to create the empty file and
then editing it?
Yep I can do that also - but never had to before!
Just tried again and it seems to be working, so it must have been me
again. I will try again later.
I may have been getting a bit muddled with how I should be using cron
and had used a combination of crontab shown in the earlier DHT11 logging
part, or using the cron.d folder which I read supersedes it.
I read about this from:
http://www.devils-heaven.com/raspberry-pi-cron-jobs/
Is that the preferred way to do it now?
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk <mailto:Bristol@mailman.lug.org.uk>
> https://mailman.lug.org.uk/mailman/listinfo/bristol
>
>
>
>
> --
> "Science is a differential equation. Religion is a boundary condition."
> Alan Turing
>
>
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol
Will get back to it later this evening
Regards
--
Peter H
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20141204/8167c075/attachment.html>
------------------------------
_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol
End of Bristol Digest, Vol 579, Issue 7
***************************************
Tidak ada komentar:
Posting Komentar