brektrou / rtl8821CU

Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux
GNU General Public License v2.0
1.58k stars 458 forks source link

Command to set interface name #218

Open rwb196884 opened 1 year ago

rwb196884 commented 1 year ago
root@calleva:~/rtl8821CU# grep -lr . | xargs sed -i '' -e '/ifcfg-wlan0/!s/wlan0/wlx00e02d2b29d3/g'
sed: can't read : No such file or directory
root@calleva:~/rtl8821CU#
rwb196884 commented 1 year ago

I think the empty string value for parameter -i is an error and the command should be

grep -lr . | xargs sed -i -e '/ifcfg-wlan0/!s/wlan0/wlx00e02d2b29d3/g'

And the list of files to sed can be cut down considerably by making the grep more specific

grep -lr wlan0 | xargs sed -i -e '/ifcfg-wlan0/!s/wlan0/wlx00e02d2b29d3/g'