why is there a + infront of 100k but a - infront of 500k?

Recommended Answers

All 2 Replies

why is there a + infront of 100k but a - infront of 500k?

You really should familiarize yourself with manpages

TESTS
       Some  tests,  for  example  -newerXY  and  -samefile,  allow comparison
       between the file currently being examined and some reference file spec‐
       ified  on the command line.  When these tests are used, the interpreta‐
       tion of the reference file is determined by the options -H, -L  and  -P
       and any previous -follow, but the reference file is only examined once,
       at the time the command line is parsed.  If the reference  file  cannot
       be  examined  (for  example,  the stat(2) system call fails for it), an
       error message is issued, and find exits with a nonzero status.

       Numeric arguments can be specified as

       +n     for greater than n,

       -n     for less than n,

       n      for exactly n.

I am not sure but my hunch is + stands for > and - stands for <.

Then I typed this command

find . -type f -size +1k -a -size -3k | ls -lcth
total 2.3M
-rw-------+ 1 mm grad 323K 2010-04-02 17:50 mif.db
drwx------+ 2 mm grad   16 2010-04-02 17:38 backup
-rw-------+ 1 mm grad 323K 2010-04-01 22:28 movie_info_db.txt
-rw-------+ 1 mm grad 480K 2010-04-01 22:28 temp_movie_db.txt
-rw-------+ 1 mm grad 7.9K 2010-04-01 20:35 util.rb
-rw-------+ 1 mm grad  240 2010-04-01 20:32 log.txt
-rw-------+ 1 mm grad  787 2010-04-01 16:52 download_movie_information.rb
-rw-------+ 1 mm grad 677K 2010-03-31 19:41 all_movies.txt
drwx------+ 2 mm grad  106 2010-03-31 19:41 lists
-rw-------+ 1 mm grad 8.0K 2010-03-31 19:38 icm_all_lists.txt
-rw-------+ 1 mm grad 5.0K 2010-03-31 19:38 icm_show_list.rb
-rw-------+ 1 mm grad  169 2010-03-31 18:26 convert_char.rb
-rw-------+ 1 mm grad  275 2010-03-31 14:38 patch.rb
-rw-------+ 1 mm grad   12 2010-03-30 16:49 state.txt
-rw-------+ 1 mm grad  119 2010-03-30 16:36 test_scan.rb
-rw-r--r--+ 1 mm grad  357 2010-03-28 15:04 test_icm_page.rb
-rw-------+ 1 mm grad   39 2010-03-28 14:56 log.tx
-rw-------+ 1 mm grad 1.3K 2010-03-27 16:09 icm.rb
-rw-------+ 1 mm grad   30 2010-03-26 14:59 test_utf8.rb
-rw-------+ 1 mm grad  28K 2010-03-22 17:30 log.html
-rw-------+ 1 mm grad  52K 2010-03-22 17:07 icm.html
-rw-------+ 1 mm grad  629 2010-03-21 15:05 icm_backup.rb
-rw-------+ 1 mm grad  29K 2010-03-21 14:36 index.html
-rw-------+ 1 mm grad  302 2010-03-21 14:35 format_lists.rb
-rw-------+ 1 mm grad  747 2010-03-21 14:34 50animtobackup.rb
-rw-------+ 1 mm grad  617 2010-03-21 14:34 50animtimeout.rb
-rw-------+ 1 mm grad  642 2010-03-21 14:34 50anim.rb

As can be seen file "download_movie_information.rb" has size 787 bytes only. How come it is appearing in the list?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.