This command lists all currently installed packages in ubuntu in a single line, for example to use later with apt install. Show Sample Output
Use xargs command to make one line.
Get newest kernel version by parsing the most bleeding-edge Makefile possible. Useful for doing things like writing live ebuilds and/or self-updating PKGBUILDs for testing purposes. Breakdown: * wget -qO - https://raw.githubusercontent.com/torvalds/linux/master/Makefile — retrieve Makefile and pipe to stdout * head -n5 — only the first 5 lines are relevant, that's where all the version variables are grep -E '\ \=\ [0-9]{1,}' — version variables always have an equals sign followed by a number * cut -d' ' -f3 — extract the individual numbers from the version variables * tr '\n' '.' — replace newlines with periods * sed -e "s/\.$// — remove trailing period Show Sample Output
only works for freeBSD where ports are installed in /usr/ports credit to http://wiki.freebsd.org/PortsTasks
another way to output the IP address' of the system
to clean up the extra lines Show Sample Output
Do this with caution.
Next time you see a mac fanboy bragging about 64-bitness of 10.6 give him this so he might sh? Show Sample Output
Same thing just a different way to get there. You will need lynx
same thing as the other
This is a dirty raw way to simply list ELF objects in a folder. The output is ready to be parsed i.e to the stripper or what else needs a path to an ELF object. Show Sample Output
This is an easy way to quickly get a status for a device in multipath on SLES systems, as long as the server is configured based on Novell's standards, where multipathed disks are referred to by /dev/disk/by-... tree. Make sure to replace name_of_vg with your Volume Group name.
This is helpful if you connect to several networks with different subnets such as 192 networks, 10 networks, etc. Cuts first three octets of ip from ifconfig command and runs nmap ping scan on that subnet. Replace wlan0 with your interface. Assumes class c network, if class b use: cut -d "." -f 1-2 and change nmap command accordingly.
Get just the IP address for a given hostname. For best results, make this a function in your shell rc file so that it can be used for things like traceroute: Titus:~$ traceroute `getip foo.com` traceroute to 64.94.125.138 (64.94.125.138), 64 hops max, 52 byte packets Show Sample Output
Show the top file size in human readable form
less ressources (processes) needed Show Sample Output
Renames files eliminating suffix, in this case everything after "-" is cutted. Just change "-" with the character you need. Show Sample Output
I liked vaporub's suggestion, here a little simplification of the sed command.
find all computer connected to my host through TCP connection Show Sample Output
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: