Изменение имен файлов на основе включающего каталога

Из документации по ядру, эта конфигурация работала для меня в прошлом (/etc/network/interfaces):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# Define primary network interface
auto eth0
iface eth0 inet manual
    bond-master bond0
    bond-primary eth0 eth1

# Define secondary network interface
auto eth1
iface eth1 inet manual
    # delay ifup to allow eth0 to come up first in the bond
    pre-up sleep 2
    bond-master bond0
    bond-primary eth0 eth1

# Define master bond interface with link local address.
auto bond0
iface bond0 inet dhcp
    bond-slaves none
    bond-mode active-backup
    bond-miimon 100

2
29.03.2017, 00:15
1 ответ

попробуйте сделать что-то вроде этого,

for d in ${PATH_OF_YOUR_DIRECTORY}/*/ ; do
    mv ${d}index.html ${PATH_WHERE_YOU_HAVE_TO_MOVE}/$(basename ${d}).html
done
1
27.01.2020, 22:19

Теги

Похожие вопросы