Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-10-2012, 03:04 AM   #1
Registered: Jun 2011
Posts: 58

Rep: Reputation: Disabled
find -print along with cpio


I have seen that for creating cpio archives people use below syntax :

find . -print | cpio -o > ....

As I check, it works if we ignore -print expression in the find.
I need to know what is the reason of writing -print here and maybe there is a case (or there was before) that it necessary.

Old 12-10-2012, 03:23 AM   #2
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Earlier versions of the find command did nothing if there were no action option; recent versions default to the -print option if no action option is given.

EDIT: less well known (it's not in the man page), there's a default path list of . so find with no arguments is functionally identical to find . -print

Last edited by catkin; 12-10-2012 at 03:27 AM.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find/grep command to find matching files, print filename, then print matching content stefanlasiewski Programming 9 06-30-2016 06:30 PM
Want cpio to run silent -- no print to display [SOLVED] RandyTech Linux - Newbie 4 09-16-2012 03:58 AM
Transferring remote files via ssh,find,cpio locally metallica1973 Programming 11 11-28-2011 01:41 PM
CPIO and Find Operation not permitted errors metallica1973 Linux - Server 4 06-16-2011 04:58 PM
[SOLVED] Bash script - how to use output from diff and find in context with cpio Mogget Programming 4 01-23-2009 11:38 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:21 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration