Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
zoeken bestanden command-line
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Dutch
View previous topic :: View next topic  
Author Message
HydroDiOxide
n00b
n00b


Joined: 22 May 2007
Posts: 55
Location: Groningen

PostPosted: Tue May 22, 2007 7:42 am    Post subject: zoeken bestanden command-line Reply with quote

Ik ben gewend om in terminals/command-line LOCATE (in Ubuntu) te gebruiken om te zoeken naar directories en files. Dit commando werkt niet in gentoo en ik vroeg me af wat het alternatief is.
Back to top
View user's profile Send private message
zwik
Apprentice
Apprentice


Joined: 08 Sep 2002
Posts: 167
Location: NL, NB, Liempde

PostPosted: Tue May 22, 2007 9:56 am    Post subject: Reply with quote

Je kan natuurlijk ook het commando find gebruiken. locate zit in de package sys-apps/slocate ;) .
_________________
Daily life and stuff.
Back to top
View user's profile Send private message
HydroDiOxide
n00b
n00b


Joined: 22 May 2007
Posts: 55
Location: Groningen

PostPosted: Tue May 22, 2007 10:20 am    Post subject: Reply with quote

FIND. Ik had al zo'n vaag vermoeden, maar kon de functionaliteit niet helemaal bevatten. Kun je een voorbeeld van een commando geven hoe ik file of directory zoek op de hele hdd (vanaf root?). Ik dacht zoiets als:
Code:
find / bestand
of
Code:
find / directory
Back to top
View user's profile Send private message
durian
Guru
Guru


Joined: 16 Jul 2003
Posts: 312
Location: Margretetorp

PostPosted: Tue May 22, 2007 12:39 pm    Post subject: Reply with quote

HydroDiOxide wrote:
FIND. Ik had al zo'n vaag vermoeden, maar kon de functionaliteit niet helemaal bevatten. Kun je een voorbeeld van een commando geven hoe ik file of directory zoek op de hele hdd (vanaf root?). Ik dacht zoiets als:
Code:
find / bestand
of
Code:
find / directory


Code:
find / -name '*html' -print


Zoekt alle HTML bestanden op / en subdirectories.

-peter
Back to top
View user's profile Send private message
Sub Zero
n00b
n00b


Joined: 20 Jul 2006
Posts: 52
Location: Belgium :: Geraardsbergen

PostPosted: Tue May 22, 2007 9:40 pm    Post subject: Reply with quote

durian wrote:
Code:
find / -name '*html' -print


Zoekt alle HTML bestanden op / en subdirectories.

-peter

De syntax is zelfs nog vrijer
Code:
find / -name *.html

_________________
Homo sapiens non urinat in ventum
Back to top
View user's profile Send private message
durian
Guru
Guru


Joined: 16 Jul 2003
Posts: 312
Location: Margretetorp

PostPosted: Wed May 23, 2007 4:51 am    Post subject: Reply with quote

Sub Zero wrote:
De syntax is zelfs nog vrijer
Code:
find / -name *.html

Ik ben van de oude school, vroeger moest er een -print bij om output te krijgen :)

-peter
Back to top
View user's profile Send private message
garo
Bodhisattva
Bodhisattva


Joined: 15 Jul 2002
Posts: 860
Location: Edegem,BELGIUM

PostPosted: Wed May 23, 2007 9:21 pm    Post subject: Re: zoeken bestanden command-line Reply with quote

HydroDiOxide wrote:
Ik ben gewend om in terminals/command-line LOCATE (in Ubuntu) te gebruiken om te zoeken naar directories en files. Dit commando werkt niet in gentoo en ik vroeg me af wat het alternatief is.


'locate' werkt wel in Gentoo, maar:
1) Je moet het wel in kleine letters schrijven.
2) 'locate' zoekt in een database ipv rechtstreeks, dus moet die db eerst worden aangemaakt met
Code:
updatedb

3) Het moet geinstalleerd zijn :
Code:
emerge -NDvua sys-apps/slocate

_________________
My favorite links this month:
- Surf Random
- Web-based SSH
- Stop Spam
Back to top
View user's profile Send private message
garo
Bodhisattva
Bodhisattva


Joined: 15 Jul 2002
Posts: 860
Location: Edegem,BELGIUM

PostPosted: Wed May 23, 2007 9:27 pm    Post subject: Reply with quote

HydroDiOxide wrote:
FIND. Ik had al zo'n vaag vermoeden, maar kon de functionaliteit niet helemaal bevatten. Kun je een voorbeeld van een commando geven hoe ik file of directory zoek op de hele hdd (vanaf root?). Ik dacht zoiets als:
Code:
find / bestand
of
Code:
find / directory


'find' kan idd gebruikt worden om bestanden direct te zoeken in plaats van in een database maar
Code:
find / bestand
zegt gewoon "Zoek overal en ook nog eens in bestand" (zonder te zeggen naar wat er gezocht moet worden).
Code:
find / directory
is om dezelfde reden verkeerd.
Wat jij wilt is bijvoorbeeld de "-name"-optie of iets als
Code:
find / | grep bestand

_________________
My favorite links this month:
- Surf Random
- Web-based SSH
- Stop Spam
Back to top
View user's profile Send private message
HydroDiOxide
n00b
n00b


Joined: 22 May 2007
Posts: 55
Location: Groningen

PostPosted: Thu May 24, 2007 7:46 am    Post subject: Reply with quote

Toch maar leren om find te gebruiken dan. Wat is de beste resource om het commando goed te leren?
Back to top
View user's profile Send private message
durian
Guru
Guru


Joined: 16 Jul 2003
Posts: 312
Location: Margretetorp

PostPosted: Thu May 24, 2007 7:53 am    Post subject: Reply with quote

HydroDiOxide wrote:
Toch maar leren om find te gebruiken dan. Wat is de beste resource om het commando goed te leren?
De man page,
Code:
man find


-peter
Back to top
View user's profile Send private message
garo
Bodhisattva
Bodhisattva


Joined: 15 Jul 2002
Posts: 860
Location: Edegem,BELGIUM

PostPosted: Thu May 24, 2007 9:03 am    Post subject: Reply with quote

Er is ook de wikipedia pagina op http://en.wikipedia.org/wiki/Find (lichter als de manpage, maar dus minder volledig).
En de officiële pagina op http://www.gnu.org/software/findutils/manual/html_mono/find.html (vollediger als de manpage, maar dus zwaarder)
_________________
My favorite links this month:
- Surf Random
- Web-based SSH
- Stop Spam
Back to top
View user's profile Send private message
durian
Guru
Guru


Joined: 16 Jul 2003
Posts: 312
Location: Margretetorp

PostPosted: Thu May 24, 2007 11:01 am    Post subject: Reply with quote

garo wrote:
Er is ook de wikipedia pagina op http://en.wikipedia.org/wiki/Find (lichter als de manpage, maar dus minder volledig).
En de officiële pagina op http://www.gnu.org/software/findutils/manual/html_mono/find.html (vollediger als de manpage, maar dus zwaarder)
Die kende ik nog niet, handig om te weten!

-peter
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Dutch All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum