LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-28-2016, 10:57 AM   #1
zaeem
Member
 
Registered: Jan 2010
Posts: 118

Rep: Reputation: 15
SVN commit


Dear Friends,

I am using a shell script that takes update from SVN, modify files and then commit them using following command;

svn commit -m "Commit using Shell Script"

During manipulation of files if any error comes then it makes file about 1 KB size whose original size was around 1 MB. Contents of files somehow deleted and above command just commit files to SVN making SVN dirty. I want to make sure that it only commits modified files whose size is greater than 1 KB.

Your assistance is requested to achieve this.

Thanking you in advance.
 
Old 09-28-2016, 11:29 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
There's a -size argument for the find command. Therefore you can find files greater than a certain size. You can specify depth for the find so it won't go down sub-directories you don't wish it to. Not sure but probably the ls command also has a size qualifier.

There are a bunch of helpful results from a web search. I did that because I know bash test operators do test explicitly for empty files, and now I know that there is not a bash test operator for specific file sizes; however there are a bunch of other question/answers out there discussing this problem.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SVN commit error 200:0k linuxlover.chaitanya Linux - Newbie 1 03-25-2011 12:11 PM
Help to do the first svn commit cstrieder Linux - General 1 01-20-2011 08:29 AM
svn commit headers trscookie Linux - Software 2 06-11-2010 10:00 AM
svn won't let me commit ixhabbaba Linux - Software 0 06-21-2008 08:44 AM
possible to get svn to follow links on a commit? hedpe Programming 2 09-22-2006 03:07 PM


All times are GMT -5. The time now is 02:10 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration