lunes, 25 de mayo de 2015

Unix commands

1) SORT issue ordering text file lines
Sort  command order file text context based on the characterset established in the server. So to deal with that problem and work with native characters byte we can use LC_ALL=C option at the beginning of the SORT command.
For example if we have the following file

*************begin demosort.txt*********************
ESTEBAN_ALVINO|ealvinoq@gmail.com
ESTEBANALVINO|ealvino@yahoo.com
ESTEBAN_ALVINO|estebana@yahoo.com
*************end demosort.txt*********************

SORT command in my server will order in this way

 $ sort demosort.txt
ESTEBAN_ALVINO|ealvinoq@gmail.com
ESTEBANALVINO|ealvino@yahoo.com
ESTEBAN_ALVINO|estebana@yahoo.com


for other side using LC_ALL=C it will appear as this

$ LC_ALL=C sort demosort.txt
ESTEBANALVINO|ealvino@yahoo.com
ESTEBAN_ALVINO|ealvinoq@gmail.com
ESTEBAN_ALVINO|estebana@yahoo.com

2) UNZIP
In order to avoid system ask for overwrite an existing files when you try to update a folder unzipping a file. use command "o", for example myzip.zip inside the current directory I will try to unzipped for second time because new files were added, with option "u" I only will add new files.
For option "d" check this link
unzip -uo myzip.zip -d .

3) MKDIR (more in this link...)
In order to clone an structure without data I need that mkdir don't fail if parent directory no exist and the command create it by default, the option needed is "p".
mkdir -p bin docs/personal docs/business lib

4) dos2unix alternative
cat mydosfile.txt | tr -d '\015' > myunixfile.txt

5. CP(link)
In order to copy hidden files use "r" option.

6. CPIO(link,link2)
clone/bk folder

7. SCP
lots of smaples (link)

jueves, 5 de febrero de 2015

Watch netflix from fedora 20

In this page you will find all the necessary steps to perform that

Just one thing to add, in my case i had have problems with wine version, so I've desinstalled and installed again using the new repo added that is specified in the link that i leave.

Furthermore, I've installed chrome from this link  and add the addin the the link said and run netflix from them without problems. :)

I've put the sequences of commands I've executed and those are:

1. Install pipeligth-selinux, which is asked as prerequisete to install pipelight
#dnf install ./pipelight-selinux-0.2.1-2.fc21.noarch.rpm

2. As pipelight is in the repository so just execute this
#dnf -y install pipelight


3. For second time in firefox didn't work and it worked in chrome so used the link above for installing chrome and the below to add the addin necessary to play netflix without problem.

https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg



viernes, 28 de noviembre de 2014

Oracle 11g - Fedora 20


Commands

- To run SQLPLUS execute this command

sqlplus sys/oracle@//localhost/XE as sysdba




IDE

To run Oracle SQL developer, run:

/opt/sqldeveloper/sqldeveloper.sh

martes, 11 de noviembre de 2014

Installing Fedora 20 on hp pavilion dm 1

I put here my experiences with fedora 20

1. It can be installed over the disk that has already windows installed, really I'm not sure if that was the reason, but after to format the drive I will be able to install the OS, be awere to backup your precious data. I beg you ... or you wife or other beloved person could be impacted.

2. Open mp4 videos give h 164 errors
I run this
yum -y install x264
and works !
credits are for this site.

3. Installing my network card driver

Seeing which network card I have:
#lspci -v
03:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)
        Subsystem: Hewlett-Packard Company Device 1795
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at 90200000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [58] Vendor Specific Information: Len=78
        Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [d0] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [13c] Virtual Channel
        Capabilities: [160] Device Serial Number 00-00-3d-ff-ff-9e-e4-d5
        Capabilities: [16c] Power Budgeting
        Kernel driver in use: wl
        Kernel modules: bcma

Getting drivers from the page of the manufacturer.

Installing according to the file readme.txt, following issues was appearing, 2 in total, and the resolution of them.

First error appeared:
/tmp/nwcarddriver/src/wl/sys/wl_linux.c:1310:64: error: macro "alloc_netdev" requires 4 arguments, but only 3 given
  dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
                                                                ^
/tmp/nwcarddriver/src/wl/sys/wl_linux.c:1310:8: error: ‘alloc_netdev’ undeclared (first use in this function)
  dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
Solution was finded in this page, which said to just add a NET_NAME_UNKNOWN

dev = alloc_netdev(sizeof(priv_link_t), intf_name,NET_NAME_UNKNOWN, ether_setup);

The second error was:
/tmp/nwcarddriver/src/wl/sys/wl_cfg80211_hybrid.c:2074:4: error: too few arguments to function ‘cfg80211_ibss_joined’
    cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);

Solution was finded in this page, which provide a portion of code to evaluate the version of the kernel, I pasted as I found it.

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
    cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, &wl->conf->channel, GFP_KERNEL);
#else
        cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
#endif
In my case the module of my wireless device is not loaded at boot time, correct me if module is not the correct name. Let me show you how to add the commands at boot time.

First we need to initiate the rc-local service as this man said us
how to add a runtime:
If not exists the file rc.local create it using
# touch /etc/rc.d/rc.local
If the file rc.local is new add the header inside the file, content of the file is highlighted in green
# vi rc.local
  #!/usr/bin/bash
  echo "hello"


start the service using
#systemctl start rc-local
check the status of the service
#systemctl status rc-local
the result of previous command in my machine is
rc-local.service - /etc/rc.d/rc.local Compatibility
   Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static)
   Active: active (exited) since Mon 2014-12-01 11:04:53 EST; 4s ago
  Process: 4502 ExecStart=/etc/rc.d/rc.local start (code=exited, status=0/SUCCESS)


After started the service add to the file rc.local the commands that you want to run at the boot time, in my case I've added these lines using vi, you can see other approach with echo by this guy:
# modprobe lib80211
# modprobe cfg80211
# insmod /custominstall/wl.ko

JIC i leave my rc.config file here.

4. Install the Video Card Drivers (Ati Radeon Series 6xxx)
The reason why I decided to install this driver was because this page remember me that card drivers open source provided by the community no always works well in the case of NVIDIA.

This page shows gives a hint how to install it in fedora.

If this error "fglrx installation requires that the system have kernel headers for 3.7 release" is raised to you make the following:
#yum list kernel*
#uname -r

Check that the versions of kernel-header, kernel-devel and uname -r are the same if that is not so, executes a 
#yum -y update 
In my case that solve my problem out.

Due that some pre-requisite to install the ATI driver is don't have GNOME this page shows how to uninstall it.
$ sudo yum shell
> remove @gnome-desktop
> ts list #check what packages are removed
> install @kde
> ts list #check that system packages aren't removed now
> run
 
Challenges
 Because when you try something new you learn also something, for example now I'm in the process of learning to configure correctly my ATI Radeon Card.
This guy give some clues to solve it out my problem, which is in summary the my machine is hang at any time :(
 
 Finally card driver has been installed using the patch provide by this generous guy.

sábado, 8 de septiembre de 2012

Opening Ports for amule

First, I have these ports in my connection configuration amule installation:

Then as root, run these three lines to allow firewall to pass info by these ports:




Links used in these posts
forums.fedoraforum.org
www.redhat.com
www.frozentux.net
foro.noticias3d.com


domingo, 22 de abril de 2012

sábado, 12 de noviembre de 2011

KDENLIVE video converter

Bien he grabado algunos archivos .AVI a un DVD, luego lo he puesto en mi Reproductor de DVD (LG con soporte DivX) y en dos de ellos solo escucho audio y en imagen nada.

Les muestro las propiedades del archivo que si reproduce.


Les muestro las propiedades de dos archivos que no reproducen.


Entonces en mi humilde saber seria cuestion de convertir los videos usando un codec apropiado.

Para tal proposito he empleado el programa KDENLIVE.

1. Debemos instalar el programa, facil ejecutando como root.

yum install kdenlive

2. Luego iniciar el programa (si les sale un error sobre MLT ..., ver este link en mi caso crear el script fue suficiente).

3. Luego agregar el video y presionar el boton Render, elegir el formato que les acomode, a mi me sirvio xVid4.