Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Forum italiano (Italian) Forum di discussione italiano
  • Search

[OT] Hard Linked Files

Tutte le discussioni direttamente correlabili all'informatica e/o a GNU/*nix.

Moderator: ago

Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
Author
Message
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

[OT] Hard Linked Files

  • Quote

Post by xchris » Thu May 20, 2004 10:42 am

con un caro amico si discuteva su come trovare i file hard-linkati.

Dato il file ciccio trovare i suoi hardlink.

La soluzione c'e' chiaramente pero' e' troppo onerosa in termini di lavoro sul FS.

1 - trovo inode
2 - find per quel inode

esiste un metodo alternativo? A occhio direi di no per come e' strutturato il filesystem.

Spero di sbagliarmi.
ciao
while True:Gentoo()
Top
randomaze
Bodhisattva
Bodhisattva
User avatar
Posts: 9985
Joined: Tue Oct 21, 2003 7:55 am
Contact:
Contact randomaze
Website

Re: [OT] Hard Linked Files

  • Quote

Post by randomaze » Thu May 20, 2004 10:53 am

xchris wrote: Dato il file ciccio trovare i suoi hardlink.
Non ho un linux sottomano per vedere, ma puoi controllare se stat fa qualcosa di simile?
Ciao da me!
Top
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

  • Quote

Post by xchris » Thu May 20, 2004 12:00 pm

Code: Select all

bash-2.05b$ stat cucu
  File: `cucu'
  Size: 5               Blocks: 8          IO Block: 4096   regular file
Device: 803h/2051d      Inode: 1896935     Links: 2
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2004-05-19 10:13:13.000000000 +0200
Modify: 2004-05-19 10:13:13.000000000 +0200
Change: 2004-05-19 10:13:18.000000000 +0200
bash-2.05b$
la soluzione troppo invasiva e' questa

Code: Select all

find . -inum `ls -i cucu | cut -d" " -f1`

/cucu
./cucu2
ciao
while True:Gentoo()
Top
MyZelF
Bodhisattva
Bodhisattva
User avatar
Posts: 2010
Joined: Tue Feb 25, 2003 10:47 pm
Location: Venice, Italy
Contact:
Contact MyZelF
Website

  • Quote

Post by MyZelF » Thu May 20, 2004 10:43 pm

Qui vengono proposte soluzioni "onerose" simili alla tua. :-?
"Larry the Cow was a bit frustrated at the current state of Linux Distributions..."
Top
Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Forum di discussione italiano”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic