Unfähig, Linux Umbenennungs auf Mac zu installieren
Frage
Ich lese die Tutorial , die mich bei util-linux zu laufen rät Paket
./configure
ich
configuring util-linux-2.12q
You don't have <scsi/scsi.h>
You don't have <linux/blkpg.h>
You don't have <linux/kd.h>
You have <locale.h>You have <langinfo.h>
You have <sys/user.h>
You have <uuid/uuid.h>
You have <rpcsvc/nfs_prot.h>
You don't have <asm/types.h>
You don't have <linux/raw.h>
You have <stdint.h>
You don't have <sys/io.h>
You have inet_aton()
You have fsync()
You have getdomainname()
You have nanosleep()
You don't have personality()
You don't have updwtmp()
You have fseeko()
You have lchown()
You don't have rpmatch()
You have <term.h>
You have ncurses. Using <ncurses.h>.
You have termcap
You don't need -lcrypt
Strange... Static compilation fails here.
You don't have native language support
You have __progname
You don't have <pty.h> and openpty()
You have wide character support
You don't have SYS_pivot_root
You have a tm_gmtoff field in struct tm
Your rpcgen output does not compile - using pregenerated code
You have zlib
You don't have blkid
Es rät mir dann den folgenden Befehl an misc-utils laufen
make rename
Ich erhalte die folgende Warnung
cc -pipe -O2 -mtune=i386 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -DNCH=1 -D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\" -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\" -DLOCALEDIR=\"/usr/share/locale\" -O2 -s rename.c -o rename
ld warning: option -s is obsolete and being ignored
Wie können Sie installieren umbenennen -command für Mac?
Lösung
Das ist eine Warnung, kein Fehler.
Ich habe das selbst gerade versucht, und es hat eine Umbenennungs ausführbare Datei erstellt.
Andere Tipps
Sie Leicht installieren Umbenennungs mit Homebrew rename
von Linux kompilieren. Es gibt einige kleine Unterschiede zu den im Tutorial . Ich verwendete Version 2.22 aus der Datei
brew install rename
Können Sie nicht nur verwenden mv
statt rename
zu kompilieren versuchen? Vielleicht alias es sogar rename
?
(EDIT: Ignorieren Sie meine Kommentare über build-essentials - wie von Xiangfan wies darauf hin, es sieht aus wie es sollte gebaut ok sowieso)
Versuchen Sie folgendes:
function rename { from=$1; to=$2; shift 2; for i in "$@"; do j=`echo $i | sed "s/$from/$to/"`; mv "$i" "$j"; done }
Fügen Sie ihn in Ihre .profile oder .bashrc und es genau wie das Red Hat umbenennen Dienstprogramm ausführen:
$rename foo bar *.txt
Schaltet foo1.txt, foo2.txt und foofoo.txt in bar1.txt, bar2.txt aber etwas irritierend, barfoo.txt.
Vielleicht kann jemand es zwicken, dies zu beheben.
es Testen von ‚Echo‘ vor ‚mv‘ setzen, so dass es eine Liste aller Änderungen gibt es ohne sie machen wird.