Web6 mrt. 2015 · You can simply do : find -name "*.mp4" -exec du -b {} \; awk 'BEGIN {total=0} {total=total+$1}END {print total}'. The -exec option of find command executes a simple command with {} as the file found by find. du -b displays the size of the file in bytes. The awk command initializes a variable at 0 and get the size of each file to display the ... Web29 okt. 2024 · Example 3. The find command is an even better way to list files based on their size. Let’s find files that are more than 2 GB in file size. The -size option tells find to search for files of a certain size. The + is “greater than” and 2 GB is specified as 2G in the syntax. $ find . -size +2G Example 4. We can also use find to search for files under a …
linux - File size in human readable format - Stack Overflow
Web4 sep. 2009 · File Size calculation with AWK. Im calculating file sizes with below AWK script. I do this before some spesific files are transferred. I run the script it works but … Web4 jun. 2024 · But how do I find files with same size? linux; bash; awk; Share. Improve this question. Follow edited Feb 2, 2012 at 16:41. Kent. 188k 32 32 gold badges 231 231 silver badges 296 296 bronze badges. asked Sep 24, 2011 … maple grove farms honey buckwheat pancake mix
arithmetic - Calculate and divide by total with AWK - Unix …
WebMaster Linux Bash scripting: AWK, SED, 10+ projects. Perfect for beginners & experts. Step-by-step guide with practical What you'll learn Unleash the Power of Shell Scripting Master the Art of Automation with bash Learn to Build Amazing Tools with Bash Scripting! Master the Art of Linux Administration Master the Command Line and Take Control of … Web20 jan. 2024 · awk ' {print length}' FILENAME Or next if you want the longest length: awk ' {ln=length} ln>max {max=ln} END {print FILENAME " " max}' You can combine above command with find using -exec option. Share Improve this answer Follow edited Mar 31, 2024 at 1:25 answered Jun 13, 2024 at 4:16 Sergio Marsilli 101 5 Add a comment 1 Web25 sep. 2024 · My shell engine is either Busybox 1.31.0 or bash 3.2. I need to get the size of the files retrieved from find command.. I've been trying to find only files, which have been modified more than 60 days ago and at the same time get the size of all those files SUMARIZED preferably in a one-liner in MB notation. maple grove farms of vermont dressing