Welcome To Snipplr


Everyone's Recent Bash Snippets



1 ... 28 29 30 31 32 ... 41
find . | xargs grep 'string' -sl The -s is for summary and won't display warning messages such as grep: ./directory-name: Is a directory The -l is for list, so we get just the filename and not all instances of the match displayed in the results...
2 2685 posted 17 years ago by mattkenefick
1 2283 posted 17 years ago by fnurl
Lists folders in a directory by size
1 2033 posted 17 years ago by ping_ch
obviously change url. you'll get (better formatted) something like... curl -o /dev/null -w %{time_total}\\n http://www.google.com % Total % Received % Xferd Average Speed Time Time Time Current D...
0 1401 posted 17 years ago by nategood
This is the command to re-enable apache after you disabled it.
0 1565 posted 17 years ago by bhubbard
Find out which version of Perl is installed on the server.
0 1389 posted 17 years ago by bhubbard
Allows you to send out a email listing all files over 10MB.
0 1694 posted 17 years ago by bhubbard
1 1753 posted 17 years ago by wdso
About the dd command: dd if=<source> of=<target> bs=<byte>("USUALLY" some power of 2, not less than 512 bytes(ie, 512, 1024, 2048, 4096, 8192, 16384[/b], but can be ANY reasonable number.) skip= seek= conv=<conversion>. Source is the data being...
0 1724 posted 17 years ago by webonomic
you have to collect the filenames from 'find' in an input file then open the input in this script
0 1892 posted 17 years ago by rowntreerob
0 1844 posted 17 years ago by hlubek
I needed a quick way to resize and save to a folder lots of images. Imagemagick is magic indeed!
1 2700 posted 17 years ago by zerolab
0 1623 posted 17 years ago by kfaulk1
0 1530 posted 17 years ago by kfaulk1
the call to the url for the ad results in redirect to the 'banner' or image file
0 1642 posted 17 years ago by rowntreerob
* Resized images are generated into TARGET_DIR. * Change the resolution (800x800 in my example) and quality (80) as you want. * The command keeps the image's proportion. 1600x1200 will be converted into 800x600, 1200x1600 into 600x800. _Notice_:...
2 2657 posted 17 years ago by Dorgendubal
0 1686 posted 17 years ago by java2025
Useful to remotely assist another person. 1. Connect to his computer using ssh 2. Execute first command listed below 3. The other person must open a terminal and execute the second command 4. Both are connected to the same terminal "screen"
1 2216 posted 17 years ago by Dorgendubal
Useful when you have to deal with ClassNotFoundException. The command looks for all jar in the current directory and any sub-directory, and checks if the jar contains the specified class. The command lists all matching jars.
0 2242 posted 17 years ago by Dorgendubal
Useful to quickly backup a folder by synchronizing it to another partition/disk.
0 1671 posted 17 years ago by Dorgendubal
Useful to quickly identify processes listening to ports (to eventually kill them).
0 1810 posted 17 years ago by Dorgendubal
Useful to convert all matching files from one encoding to another. Some examples:
1 2566 posted 17 years ago by Dorgendubal
* _HOST_: remote host * _PORT_: ssh port (default 22) * _PATH_: remote path to synchronize
0 1717 posted 17 years ago by Dorgendubal
1 ... 28 29 30 31 32 ... 41