Skip to content

Twopenguins.it

Here is what i forgot.

Tag: find

find: remove directories from output

To remove the full path to your find results add:

-exec basename {} \;

to your search:

bash-4.1$ find . -type f -name "*.pdf" -exec basename {} \;
FreeBSD_Portability_With_VMware_BSD_04_2011.pdf
Network_Security_Hakin9_02_2011.pdf

Author simplexPosted on April 9, 2011April 6, 2011Categories BSD, LinuxTags findLeave a comment on find: remove directories from output

Find and exec

An example:

find . -name "*.zip" -type f -exec unzip {} \;

Author simplexPosted on March 14, 2011Categories LinuxTags findLeave a comment on Find and exec

Categories

  • BSD
  • Hacks
  • Homebrewing
  • Interwebz
  • Linux
  • Other
  • SAP
  • Slackware
  • Uncategorized
  • Windows

Tags

  • amarillo
  • apa
  • apache
  • audio
  • backup
  • bash
  • bob
  • cascade
  • centos
  • cgi
  • church of cubgenius
  • cyanogenmod
  • dryhop
  • find
  • freebsd
  • freenas
  • git
  • google
  • google chrome
  • google chrome os
  • hotkeys
  • hp
  • mailgraph
  • microsoft
  • monitoring
  • mysql
  • notebook
  • patrick volkerding
  • postfix
  • reset password
  • rsync
  • Samsung Galaxy S4
  • shell
  • simcoe
  • Slackware
  • squirrelmail
  • ssh
  • ssl
  • sudo
  • symon
  • symux
  • syweb
  • virtualhosts
  • zabbix
  • zabbix server
Twopenguins.it Proudly powered by WordPress
Utilizziamo i cookie per essere sicuri che tu possa avere la migliore esperienza sul nostro sito. Se continui ad utilizzare questo sito noi assumiamo che tu ne sia felice.Ok Reject Read More
Privacy & Cookies Policy

Necessary Always Enabled