Skip to content

Jonas Silveira

o blog de um cientista da computação

Archive

Tag: shell

Just use the split command:

split --bytes=1G large_file_name short_dir/short_file_prefix_

This will create a lot of files with 1 G in short_dir. The files will named short_file_prefix_aa, short_file_prefix_ab, short_file_prefix_ac …

Found in Techie Corner.

Facebooktwitterredditpinterestlinkedinmail

Find files and save a text file named “script.sh”:

find . | xargs grep -l "text string here" | awk '{print "rm "$1}' > script.sh

Then chmod +x the file and run. Solution found in Stack Overflow.

Facebooktwitterredditpinterestlinkedinmail