LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 12-10-2012, 03:04 AM   #1
vahab
Member
 
Registered: Jun 2011
Posts: 56

Rep: Reputation: Disabled
find -print along with cpio


Hi,

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.

Thanks
 
Old 12-10-2012, 03:23 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
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.
  


Reply


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 8 12-18-2013 06:36 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


All times are GMT -5. The time now is 04:09 PM.

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