Posts

Showing posts with the label Command

Tor hash-password for Windows 10

Image
Apparently this is a known bug that when your run tor.exe from the command line it is running but opens in a hidden window. To get around this, run the following:  tor --hash-password *your_password* | more . Hopefully this works. See more about the issue  here . And original poster  https://tor.stackexchange.com/a/9145. Credit goes to [ tomcraft ]

Updated: RPM package managment - Part 2

[root@RHEL6 ~]# rpm -qa |sort |less            //List all installed packages abrt-2.0.8-15.el6.centos.x86_64 abrt-addon-ccpp-2.0.8-15.el6.centos.x86_64 abrt-addon-kerneloops-2.0.8-15.el6.centos.x86_64 abrt-addon-python-2.0.8-15.el6.centos.x86_64 abrt-cli-2.0.8-15.el6.centos.x86_64 abrt-desktop-2.0.8-15.el6.centos.x86_64 abrt-gui-2.0.8-15.el6.centos.x86_64 abrt-libs-2.0.8-15.el6.centos.x86_64 abrt-tui-2.0.8-15.el6.centos.x86_64 abyssinica-fonts-1.0-5.1.el6.noarch acl-2.2.49-6.el6.x86_64 acpid-1.0.10-2.1.el6.x86_64 aic94xx-firmware-30-2.el6.noarch alsa-lib-1.0.22-3.el6.x86_64 alsa-plugins-pulseaudio-1.0.21-3.el6.x86_64 alsa-utils-1.0.22-5.el6.x86_64 anaconda-13.21.195-1.el6.centos.1.x86_64 anaconda-yum-plugins-1.0-5.1.el6.noarch anthy-9100h-10.1.el6.x86_64 ============================================================= [root@RHEL6 ~]# rpm -qf /etc/host.conf      //Identify the package associated with file setup-2.8.14-20....

Adding Extra Hard Disk Space to existing Linux System

[root@vmlinux ~]# fdisk /dev/sdb The number of cylinders for this disk is set to 2219. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs    (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): n Command action    e   extended    p   primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-2219, default 1): 1 Last cylinder or +size or +sizeM or +sizeK (1-2219, default 2219): Using default value 2219 Command (m for help): p Disk /dev/sdb: 18.2 GB, 18253611008 bytes 255 heads, 63 sectors/track, 2219 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes    Device Boot      Start         End      Blocks   Id  Sy...

Xargs Command Examples

xargs is a very powerful command that takes output of a command and pass it as argument of another command. Following are some practical examples on how to use xargs effectively. Xargs Example 1: When you are trying to delete too many files using rm, you may get error message: /bin/rm Argument list too long – Linux. Use xargs to avoid this problem. # find ~ -name ‘*.log’ -print0 | xargs -0 rm -f    Xargs Example 2: Get a list of all the *.conf file under /etc/. There are different ways to get the same result. Following example is only to demonstrate the use of xargs. The output of the find command in this example is passed to the ls –l one by one using xargs. # find /etc -name "*.conf" | xargs ls –l Xargs Example 3: If you have a file with list of URLs that you would like to download, you can use xargs as shown below. # cat url-list.txt | xargs wget –c Xargs Example 4: Find out all the jpg images and archive it. # find / -name *.jpg -type f -print |...

rpm command cheat sheet for Linux

rpm is a powerful Package Manager for Red Hat, Suse and Fedora Linux. It can be used to build, install, query, verify, update, and remove/erase individual software packages. A Package consists of an archive of files, and package information, including name, version, and description: Syntax Description Example(s) rpm -ivh {rpm-file} Install the package rpm -ivh mozilla-mail-1.7.5-17.i586.rpm rpm -ivh --test mozilla-mail-1.7.5-17.i586.rpm rpm -Uvh {rpm-file} Upgrade package rpm -Uvh mozilla-mail-1.7.6-12.i586.rpm rpm -Uvh --test mozilla-mail-1.7.6-12.i586.rpm rpm -ev {package} Erase/remove/ an installed package rpm -ev mozilla-mail rpm -ev --nodeps {package} Erase/remove/ an installed package without checking for dependencies rpm -ev --nodeps mozilla-mail rpm -qa Display list all installed packages rpm -qa rpm -qa | less rpm -qi {package} Display install...

RPM Tit-Bits ;-)

The -U qualifier is used for updating an RPM to the latest version, the -h qualifier gives a list of hash # characters during the installation and the -v qualifier prints verbose status messages while the command is run. Here is an example of a typical RPM installation command to install the MySQL server package: [root@localhost rajesh]# rpm -Uvh mysql-server-5.1.52-1.el6_0.1.x86_64 Preparing...        ####################### [100%]   1:mysql-server   ####################### [100%] Installing Source RPMs :- Compiling and installing source RPMs with Fedora can be done simply with the rpmbuild command [root@localhost rajesh]# rpmbuild --rebuild filename123.src.rpm [root@localhost rajesh]# rpm -qi openssh Name        : openssh                      Relocations: (not relocatable) Version...

IP command syntax

OBJECT The names of all objects may be written in full or abbreviated form, f.e. address is abbreviated as addr or just a. link network device. address protocol (IP or IPv6) address on a device. addrlabel label configuration for protocol address selection. neighbour ARP or NDISC cache entry. route routing table entry. rule rule in routing policy database. maddress multicast address. mroute multicast routing cache entry. tunnel tunnel over IP. xfrm framework for IPsec protocol. Example:- [rajesh@localhost ~]$ ip neighbour 192.168.150.1 dev eth0 lladdr 00:50:56:c0:00:08 DELAY 192.168.150.2 dev eth0 lladdr 00:50:56:fd:c8:aa STALE [rajesh@localhost ~]$ ip addrlabel list prefix ::1/128 label 0 prefix ::/96 label 3 prefix ::ffff:0.0.0.0/96 label 4 prefix 2001::/32 label 6 prefix 2001:10::/28 label 7 ...