Re: [PLUG] Reading a file with a dash

2021-06-29 Thread Robert Citek
On Tue, Jun 29, 2021 at 9:06 PM Michael Barnes wrote: > On Tue, Jun 29, 2021 at 7:47 AM Paul Heinlein wrote: > > > On Tue, 29 Jun 2021, Michael Barnes wrote: > > > > > Somehow, I managed to create a file named -u. I cannot figure out how > to > > > look at it as any command I give thinks -u is

Re: [PLUG] Reading a file with a dash

2021-06-29 Thread Michael Barnes
On Tue, Jun 29, 2021 at 7:47 AM Paul Heinlein wrote: > On Tue, 29 Jun 2021, Michael Barnes wrote: > > > Somehow, I managed to create a file named -u. I cannot figure out how to > > look at it as any command I give thinks -u is an option, not the > filename. > > > > I cannot read, edit, move,

Re: [PLUG] bash environment when ssh'ing?

2021-06-29 Thread Reid
Does your ~/.bash_profile not source ~/.bashrc? Mine (Fedora) does by default but maybe yours is different. https://unix.stackexchange.com/questions/332531/why-does-remote-bash-source-bash-profile-instead-of-bashrc Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On

Re: [PLUG] bash environment when ssh'ing?

2021-06-29 Thread Russell Senior
More information, this is an Ubuntu 20.04 box, though I don't remember if I installed fresh or updated from 16.04. My /etc/passwd line says /bin/bash. My .bash_profile does *NOT* source .bashrc, but .bash_login does. Including the source .bashrc in .bash_profile fixes it. Thank you! On Tue, Jun

Re: [PLUG] bash environment when ssh'ing?

2021-06-29 Thread Larry Brigman
I had something similar on a Centos 7 system and found that my login shell was /bin/sh. Even though /bin/sh was linked to bash, it acted more like a Bourne shell and wasn't acting on my .bashrc or .bash_profile. On Tue, Jun 29, 2021 at 3:09 PM Reid wrote: > Does your ~/.bash_profile not source

[PLUG] bash environment when ssh'ing?

2021-06-29 Thread Russell Senior
I noticed that my attempt to keep my shell history indefinitely was thwarted. My .bashrc has HISTFILESIZE=-1 and HISTSIZE=-1, but when I ssh in to the box and run "echo $HISTFILESIZE " I mysteriously get 500. I don't currently understand why and I have not yet dug into serious research yet. Does

Re: [PLUG] Reading a file with a dash

2021-06-29 Thread Rich Shepard
On Tue, 29 Jun 2021, Paul Heinlein wrote: Most GNU utilities will stop interpreting options when they encounter a bare ' -- ' string. So this should work mv -- -u newfilename Or, just use the . directory in the filename: less ./-u Perhaps "-u" will work, too. Rich

Re: [PLUG] Reading a file with a dash

2021-06-29 Thread Paul Heinlein
On Tue, 29 Jun 2021, Michael Barnes wrote: Somehow, I managed to create a file named -u. I cannot figure out how to look at it as any command I give thinks -u is an option, not the filename. I cannot read, edit, move, delete, or anything. Ideas appreciated. Most GNU utilities will stop

[PLUG] Reading a file with a dash

2021-06-29 Thread Michael Barnes
Somehow, I managed to create a file named -u. I cannot figure out how to look at it as any command I give thinks -u is an option, not the filename. I cannot read, edit, move, delete, or anything. Ideas appreciated. Michael