Re: How Do You Change a Directory Name Without 'mv'?

From: grenoble (gregnoble_at_j9n35c.inval)
Date: 11/28/05


Date: Sun, 27 Nov 2005 23:35:22 -0800


"Jack Strangio" <check@approved.hdr> wrote in message
news:IqJosH.7Mn@ozemail.com.au

> So I could move to / with 'cd', but had no 'ls'. I overcame that
> problem with ' echo * ', hence I could see that my /bin had been
> changed to /binz. Now all I had to do was find a way of using my
> 'bash' commands to do the job of changing it back. I'm sure I
> saw a method for this many years ago, but I couldn't remember it.
>
> (So I rebooted with Knoppix and fixed it in a jiffy.)
>
> Anyhow, a quick puzzle for the shell gurus: How can you change a
> directory name using nothing but the 'bash' built-ins?

/binz/mv /binz /bin

>
> Jack



Relevant Pages

  • Re: MC Alternative? (File Managers)
    ... >> almost every personal computer in existence and are considered ... >> stripped down file manager for the console. ... > combination of programmable F# keys (through bash) and bash ... > by your shell (there are no built-in commands). ...
    (comp.os.linux.misc)
  • Re: MC Alternative? (File Managers)
    ... >> almost every personal computer in existence and are considered ... >> stripped down file manager for the console. ... > combination of programmable F# keys (through bash) and bash ... > by your shell (there are no built-in commands). ...
    (comp.unix.questions)
  • Re: why wont my awk if/else work for both conditions?
    ... output1.txt; then echo y; else echo n; fi ... bash - but then stops. ... commands executed while in sh. ... but only when i type it directly into the prompt - not ...
    (comp.unix.shell)
  • Re: bash history search key binding
    ... maybe your bash history was accidentally reset.. ... or lost its cd* commands .. ... will display the cd commands in your current history.. ... Maybe I should try reassigning the backward search command to CTRL-R for a while and see if it has any limitations that I didn't notice while experimenting.. ...
    (Debian-User)
  • Re: PYTHONPATH
    ... The error indicates the shell tried to execute a program named '1' and couldn't find one. ... Arthimetic expressions generally have to be wrapped in ) in bash: ... non-interactive shell with the --login option, it first reads and executes ... commands from the file /etc/profile, ...
    (comp.lang.python)