bascompanies.blogg.se

Delete zero byte file in unix
Delete zero byte file in unix







delete zero byte file in unix

In Linux, briefer approaches are usually available using -delete. In this case, find will handle splitting truly long file lists into separate /bin/rm commands. For long file lists, several /bin/rm commands may be executed to keep the list from overrunning the command line length limit.Ī similar effect can be achieved with less typing on more recent OSes, using a + in find to replace the most common use of xargs in a style still lends itself to other actions besides /bin/rm. The above command is very portable, running on most versions of Unix rather than just Linux boxes, and on versions of Unix going back for decades. type f -size 0 -print0 | xargs -0 /bin/rm -f

delete zero byte file in unix delete zero byte file in unix

You can lower the potentially huge number of forks to run /bin/rm by: find.









Delete zero byte file in unix