Get an approximation of who the workstation is assigned to. You can wrap it in su - "$()" if you want to log into a shell as that user. Show Sample Output
Useful when you need to generate password or random hash string. If you need longer string adjust parameter for "head -c 20" Show Sample Output
Quick way to get the URL of the most recent audio file out of a podcast xml feed without any fancy xml parsing tools. Just curl, grep and head
this one includes special characters. note some some chars may be disallowed on windows systems. *nix will allow pretty much any character in a password except a carriage return. you do not want non printing characters in your password, so this is limited to the printable chars displayed on a keyboard , less space and return. edited to fix minor typo Show Sample Output
Returns a list, with attributes (think `ls -l`), in reverse chronological order. N is a single numeric parameter. Robust against unfriendly filenames and directory structures. Show Sample Output
Display the top processes sorted by memory usage. This is mostly useful because it's easy to remember and can give me a quick 'top' view of a group of servers when used over pssh. (Though I'd recommend |head -10 to minimize the output). Show Sample Output
Grabs the first JSON file in the directory, reads its keys, prints TSV, then prints all the json files' values as TSV. Nested objects appear as json. Unhappy times if your json has literal tabs in it. Show Sample Output
This command will find any named file types in / between two dates then will list all the metadata of those files in long format and human readable form. Adding a 't' flag to the ls command sorts the files by modified time. After all that the head -5 lists the first 5 which can be changed.
by determining most popular use in history using percentage . Show Sample Output
This server can be access by a browser or other remote terminal with ncat. I have to use de test && break to allow ctrl-c to close. Show Sample Output
This is a alternate command I like to use instead of TOP or HTOP to see what are the processes which are taking up the most memory on a system. It shows the username, process ID, CPU usage, Memory usage, thread ID, Number of threads associated with parent process, Resident Set Size, Virtual Memory Size, start time of the process, and command arguments. Then it's sorted by memory and showing the top 10 with head. This of course can be changed to suit you needs. I have a small system which is why Firefox is taking so much resources. Show Sample Output
Finds the login id of the user that owns the console. I use it to reset my touchpad after resume from suspend in /etc/pm/sleep.d/s99local
When bundle install sucks ...This runs isuckat_ruby.rb and when stderror matches find gem ' it will gem install what ever is missing ... Show Sample Output
to simulating connections Simultaneous to specific server adress to test penetrations Show Sample Output
To allow recursivity :
find -type f -exec md5sum '{}' ';' | sort | uniq -c -w 33 | sort -gr | head -n 5 | cut -c1-7,41-
Display only filenames :
find -maxdepth 1 -type f -exec md5sum '{}' ';' | sort | uniq -c -w 33 | sort -gr | head -n 5 | cut -c43-
Show Sample Output
alex@alex-box:~$ sl
The program 'sl' is currently not installed. You can install it by typing:
sudo apt-get install sl
alex@alex-box:~$ dolast
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
sl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
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: