commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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:
--vrdp on enables VirtualBox RDP server for the VM
--vrdpport 3389 ndicates the TCP port that the server will accept RDP connections direct to the VM (for each VM is assigned a different port)
--vrdpauthtype external RDP console gives access to the VM Host physical users via authentication
In fact, in the 3.1.x version of VirtualBox, the external value for the parameter --vrdpauthtype allows access via RDP only to the user who started the VM.
The workaround is to add the user that runs the VM to shadow group, using the command
first need to Edit the configuration file
/home/cicciobomba/.subversion
and under the [tunnels] add this line
ciccio_diverso = /usr/bin/ssh -p 12345
Finally, we can make the file "unchangeable"
sudo chattr +i
The command tasksel allows the choice of packages from the command line to get predefined configurations for specific services (usually this option is offered during installation).
How to extract data from one table:
mysqldump --opt --where="true LIMIT 5000" dbinproduzione tabella > miodbditest_tabella.sql
was inspired by http://www.commandlinefu.com/commands/view/8936/boot-from-a-block-device-without-giving-root-privilege-to-virtual-box
volpedimongibello= virtual machine name
fighetto= controller name
tutto.iso= DVD iso image
How to remove the DVD:
VBoxManage storageattach "volpedimongibello" --storagectl "fighetto" --port 1 --device 0 --type dvddrive --medium none
How to add an "alternate access mapping" from the command line and avoid passing on Friday evening following the interpretation of the all-too-terse "log" of SharePoint?
This command marks it as "dirty" NTFS partition, forcing Windows to do the scandisk during boot. It is convenient if you work hard to NTFS partitions under Linux
With this command you can resize an NTFS partition by specifying the new size (X) in Kbytes, Mbytes or Gbytes. If you plan to do this it is advisable to precede --no-action parameter to size
see more:
http://ubuntuforums.org/showthread.php?t=1244058
and
With this command you can create an empty NTFS partition. The command is useful if, for example, we want to format a previous installation of Windows and reinstall before you want to restore some files on the partition.
Although not frequently used, it is possible to clone an NTFS partition to an image file and, where necessary, restore the image to another partition. This command is useful, for example, if we want to keep a backup copy of our Windows installation, or in a corporate environment to install or repair a Windows of one or more computers. For the command syntax is refer to the documentation (man ntfsclone)
where
- memory 256 assign 256 Mb RAM
- acpi on enable ACPI (mandatory if you use Winfog 2000
- ioapic off disable the IO APIC. Not useful if you use one CPU (on virtual machine or a 32 bit operative system). As ACPI, this switch is mandatory for Winbug 2000
- pae on enable the Phisical Address Extension how to use more than 4Gb of RAM on x86 CPU
- hwvirtex on enables hardware virtualization extensions for microprocessors that have this feature (which should be also enabled in the BIOS of the motherboard)
- nestedpaging on allows part of the processes of memory management hardware are made directly
Assuming we have a disk image, created by dd if=/dev/sda of=image.dd we can check the image's partition layout with fdisk -ul image.dd, then substitute "x" with starting sector of the partition we want to mount. This example assumes that the disk uses 512Byte sectors
mtop allows you to monitor the operation of a MySQL application in real time. See, among the high, the number of queries performed per second, slower queries, the number of active processes.
To install on Ubuntu
sudo apt-get-y install mtop
The command line can be accessed by using the cmd command which will open a command window with a DOS interface. The command line is a throw back to the early days of computing before there was a Windows interface.
then
xinput set-prop 13 "Device Enabled" 0
how to disable touchpad, and
xinput set-prop 13 "Device Enabled" 1
how to enable again
"intelligenti pauca"
The following command finds all the files not modified in the last 5 days under /protocollo/paflow directory and creates an archive files under /var/dump-protocollo in the format of ddmmyyyy_archive.tar