Uses sed to quickly set log level in httpd.conf. For Apache 2.4 installed via Software Collections on RHEL6 systems.
This command is true for ubuntu touch on french langage
Prints a string as a sequence of hexadecimal values. Output comes in space separated pairs, regardless of ASCII or Unicode characters Show Sample Output
This shell calculator uses POSIX features only and is therefore portable. By default the number of significant figures is limited to 8 with trailing zeros stripped, resembling the display of a basic pocket calculator. You might want to increase this to 12 to emulate a scientific calculator. Show Sample Output
Converts windows lined-style file to unix. see http://en.wikipedia.org/wiki/Newline Can be used to convert from linux2dos : just invert \r\n and \n.
If you want certain files out of a directory hierarchy, this will copy just the listed files, but will create the directory hierarchy in the new location ($DIR/)
Kills all windows in a gnu screen session and terminates it , on pressing Control-f , useful in closing screen session with large number of windows . Add it to your screenrc .
yt-mp3chanrip() { for count in 1 51 101 151 201 251 301; do for i in $(curl -s http://gdata.youtube.com/feeds/api/users/"$1"/uploads\?start-index="$count"\&max-results=50 | grep -Eo "watch\?v=[^[:space:]\"\'\\]{11}" | uniq); do ffmpeg -i $(wget http://youtube.com/"$i" -qO- | sed -n "/fmt_url_map/{s/[\'\"\|]/\n/g;p}" | sed -n '/^fmt_url_map/,/videoplayback/p' | sed -e :a -e '$q;N;5,$D;ba' | tr -d '\n' | sed -e 's/\(.*\),\(.\)\{1,3\}/\1/') -vn -ab 128k "$(youtube-dl -e http://youtube.com/"$i").mp3"; done; done; unset count i; }
create the function and run with
yt-mp3chanrip YoutubeUsername
Great for channels like ukfDrumAndBass that only post music. No more need for third party browser plugins or websites that only convert one vid one at a time. It'll convert and save to CWD up to 300 of a user's videos to mp3s, one at a time. To increase, just increment the $count pattern. This is a concoction from commands #7718 and #7752, so it uses ffmpeg wget, curl, sed, and youtube-dl -- youtube-dl is only used to get the title of the video which it uses to name the mp3 file. You can use a different naming method if you want and the function should still work.
This is usefull when we don't know the exact name of the process, but the application name A limitation is that the regular expression only tries to match the last part of the full command (i.e. the bin file name itself). But this is way shorter than the following one: ps axww | grep SomeCommand | awk '{ print $1 }' | xargs kill Show Sample Output
Add DuckDuckGo Search as search provider on gnome-shell/gnome3 . Needs root permission. To see the results, use alt+f2 and then type r.
if dir1 does not exists
Testing in a TTY terminal , not emulator . Show Sample Output
shorter version. I believe find is faster than ls as well.
Say I have configured a fully optimized squid server A listen on [xxxx:xxxx::xxxx]:3128, within ISP_foo. But when I was with ISP_bar , I can not access the proxy with full speed due to ISP's limit upon the normal clients among different ISP. If you are curious where the ridiculous ISPs are, I'll tell you the truth --that's CHINA. However, servers' network connection is not enslaved to that limitation, especially with IPv6. So, I can do this socat linefu on a server B of ISP_bar. me >> B(ISP_bar)>> A(ISP_foo)
Renames all files ending in "_test.rb" to "_spec.rb"
Inner "ps...grep..." command searches for a process matching the specified . "lsof -p lists all file descriptors owned by . Includes open files, sockets, devices, etc... Show Sample Output
recurse through all files, get the message hash, flip the output as filename, hash value Show Sample Output
This is a quick way to find what is hogging disk space when you get a full disk alert on your monitoring system. This won't work as is with filesystems that allow embedded spaces in user names or groups (read "Mac OS X attached to a Windows Domain"). In those cases, you will need to change the -k 5 to something that works in your situation. Show Sample Output
More info http://www.gdal.org/ogr2ogr.html
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: