> On 23/02/06 19:32, Daniele B. wrote:
>> Remaning on the simplicity to do stuff.. did you ever try:
>> 
>> cd /home
>> mkdir 5mode-com
>> mv * 5mode-com/
>> 
>> I get:
>> 
>> rename 5mode-com to 5mode-com/5mode-com: invalid argument
> 
> That has to do with sh(1) globbing rules. The shell did exactly what you told 
> it
> to and expanded _everything_ in the present working directory. Then it 
> attempted
> to move all of that inside "5mode-com". But moving a directory inside of 
> itself
> is invalid, so it errored.
> 
> This happens on Linux too (demonstrated using termux on Android in this case,
> but I guarantee you can reproduce this elsewhere).


I remember the billboard message that was waving on the Healthrew airport
passengers heads in 2009: "There is no perfection, everyone copy each other."

The skary part was that it sounded more like a suggestion also that one..

Maybe is just your way to let me appear Off Topic... :D

-- Daniele Bonini

Feb 6, 2023 23:46:23 Ashlen <euryd...@riseup.net>:

> On 23/02/06 19:32, Daniele B. wrote:
>> Remaning on the simplicity to do stuff.. did you ever try:
>> 
>> cd /home
>> mkdir 5mode-com
>> mv * 5mode-com/
>> 
>> I get:
>> 
>> rename 5mode-com to 5mode-com/5mode-com: invalid argument
> 
> That has to do with sh(1) globbing rules. The shell did exactly what you told 
> it
> to and expanded _everything_ in the present working directory. Then it 
> attempted
> to move all of that inside "5mode-com". But moving a directory inside of 
> itself
> is invalid, so it errored.
> 
> This happens on Linux too (demonstrated using termux on Android in this case,
> but I guarantee you can reproduce this elsewhere).
> 
> ~ $ cd $(mktemp -d)
> .../tmp/tmp.7WQbdeMg3C $ pwd
> /data/data/com.termux/files/usr/tmp/tmp.7WQbdeMg3C
> .../tmp/tmp.7WQbdeMg3C $ touch file{1,2,3}
> .../tmp/tmp.7WQbdeMg3C $ mkdir dir1
> .../tmp/tmp.7WQbdeMg3C $ echo *
> dir1 file1 file2 file3
> .../tmp/tmp.7WQbdeMg3C $ mv * dir1/
> mv: cannot move 'dir1' to a subdirectory of itself, 'dir1/dir1'
> .../tmp/tmp.7WQbdeMg3C $ uname
> Linux
> .../tmp/tmp.7WQbdeMg3C $ echo $SHELL
> /data/data/com.termux/files/usr/bin/bash

Reply via email to