Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
teknopedia

teknopedia

teknopedia

teknopedia

teknopedia

teknopedia
teknopedia
teknopedia
teknopedia
teknopedia
teknopedia
  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
  1. Weltenzyklopädie
  2. basename - Teknopedia
basename - Teknopedia

basename è un comando dei sistemi operativi Unix e Unix-like, e più in generale dei sistemi POSIX[1]. Ricevuto un percorso, basename elimina tutto ciò che precede l'ultimo slash, estraendo così il nome del file, e lo stampa sullo standard output. È il duale di dirname.

Sintassi

[modifica | modifica wikitesto]

La specifica di Single UNIX Specification per basename è:

basename stringa [suffisso]
stringa
Un percorso
suffisso
Se specificato, basename eliminerà anche il suffisso

Esempi

[modifica | modifica wikitesto]

basename recupera l'ultimo nome da un percorso ignorando gli slash finali:

$ basename /home/jsmith/base.wiki
base.wiki

$ basename /home/jsmith/
jsmith

$ basename /
/

basename si può usare anche per rimuovere la parte finale di un nome di file, ma non il suo intero nome:

$ basename /home/jsmith/base.wiki .wiki
base

$ basename /home/jsmith/base.wiki ki
base.wi

$ basename /home/jsmith/base.wiki base.wiki
base.wiki

Note

[modifica | modifica wikitesto]
  1. ^ (EN) basename, in The Open Group Base Specifications Issue 7, 2018 edition. URL consultato il 03-04-2020.

Voci correlate

[modifica | modifica wikitesto]
  • dirname

Collegamenti esterni

[modifica | modifica wikitesto]
  • (EN) basename da The Open Group Base Specifications Issue 7
  • (EN) basename(1) - Linux man page
V · D · M
Programmi Unix/Unix-like con interfaccia a riga di comando e comandi interni della shell unix
File systemcat · cd · chattr · chmod · chown · chgrp · cksum · cmp · cp · du · df · fdisk · file · fsck · fuser · gzip · ln · ls · lsattr · lsof · mkdir · mknod · mount · mv · pwd · rm · rmdir · split · tar · touch · umount · umask
Processiat · chroot · crontab · exit · kill · killall · nice · nohup · pgrep · pidof · pkill · ps · pstree · sleep · time · top · wait
Ambiente utentealias · env · export · finger · id · logname · mesg · newgrp · passwd · su · sudo · uname · uptime · w · wall · who · whoami · write
Elaborazione testoawk · comm · cut · diff · ed · ex · fmt · head · iconv · join · less · more · paste · sed · sort · tail · tr · uniq · vi · wc · xargs
Script di shellbasename · dirname · echo · expr · false · printf · test · true · unset
Retedig · nslookup · ifconfig · netstat · ping · rcp · rlogin · route · netcat · traceroute
Ricerchefind · grep · strings
Amministrazionedmesg · groupadd · groupdel · groupmod · mdadm · shutdown · useradd · userdel · usermod
Altribanner · bc · cal · clear · date · dd · lp · man · size · tee · tput · yes
  Portale Informatica: accedi alle voci di Teknopedia che trattano di informatica
Estratto da "https://it.wikipedia.org/w/index.php?title=Basename&oldid=111925413"

  • Indonesia
  • English
  • Français
  • 日本語
  • Deutsch
  • Italiano
  • Español
  • Русский
  • فارسی
  • Polski
  • 中文
  • Nederlands
  • Português
  • العربية
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022