LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Tuesday, January 10, 2017
Linux Mint: How to fix Genymotion error `CXXABI_1.3.8' not found
5 Steps to fix it:
Wednesday, June 22, 2011
How to disable monitor standby in Linux
To check if your video card support DPMS just run
and see the result:
You should get something similar to this output:
To disable these settings just run:
Run again
to check the new settings
If you to make these settings permanents just add these rows to your xorg.conf
xset q
and see the result:
You should get something similar to this output:
DPMS (Energy Star):
Standby: 1200 Suspend: 1800 Off: 2400
DPMS is Enabled
Monitor is On
To disable these settings just run:
xset dpms 0 0 0
Or disable DPSM with
xset -dpms
Run again
xset q
to check the new settings
If you to make these settings permanents just add these rows to your xorg.conf
Section “ServerFlags”
Option “blank time” “0″
Option “standby time” “0″
Option “suspend time” “0″
Option “off time” “0″
Option “dpms” “false”
EndSection
Tuesday, September 1, 2009
Adding a new disk to a Linux Fedora machine
as root:
You'll get something like this:
So the new disk is
To create a new partition:
hit enter (first cylinder)
hit enter (last cylinder)
now check the new status with
and now you'll get something like this:
Now format the new partition
Create a new folder to mount the new partition:
mkdir
and edit
then
fdisk -l
to find the new disk.You'll get something like this:
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a121f
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 1044 8185117+ 8e Linux LVM
Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/sdb doesn't contain a valid partition table
So the new disk is
/dev/sdb
To create a new partition:
fdisk /dev/sdb
n
(new partition)p
(primary partition)1
(partition 1)hit enter (first cylinder)
hit enter (last cylinder)
w
(write changes and quit)now check the new status with
fdisk -l
and now you'll get something like this:
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a121f
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 1044 8185117+ 8e Linux LVM
Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x6fad050b
Device Boot Start End Blocks Id System
/dev/sdb1 1 1044 8385898+ 83 Linux
Now format the new partition
mkfs.ext3 /dev/sdb1
Create a new folder to mount the new partition:
mkdir
/disk2
and edit
/etc/fstab
to mount it after the next reboot adding this line/dev/sdb1 /disk2 ext3 defaults 1 2
then
reboot
Wednesday, March 25, 2009
crontab - scheduled tasks in Linux
crontab is a file which contains the schedule of cron entries to be run and at what times they are to be run.
A cron schedule is a simple ASCII text file. Each user has their own cron schedule. You can edit it only with the crontab command. The default text editor is usually
usage:
syntax:
you have 6 positions, 5 for the time, 1 for the command to execute
* * * * * command_to_execute
| | | | |
| | | | |_Weekday 0-6 (0 = Sunday)
| | | |___Month 1-12
| | |_____Day 1-31
| |_______Hour 0-23 (0 = midnight)
|_________Minute 0-59
some example:
this entry remove all files in temp directory every day at 8:30 AM
this entry remove all files in temp directory from monday to friday every hour at minute 5 and 35
this is the same as the first example but with no email notification and no log file
this is the same as the first example but with no email notification and the log file redirected to a custom location (
A cron schedule is a simple ASCII text file. Each user has their own cron schedule. You can edit it only with the crontab command. The default text editor is usually
vi
usage:
crontab -e add or edit a scheduled task
crontab -l list the the scheduled tasks
crontab -r remove all scheduled tasks
syntax:
you have 6 positions, 5 for the time, 1 for the command to execute
* * * * * command_to_execute
| | | | |
| | | | |_Weekday 0-6 (0 = Sunday)
| | | |___Month 1-12
| | |_____Day 1-31
| |_______Hour 0-23 (0 = midnight)
|_________Minute 0-59
some example:
30 8 * * * rm /home/{username}/temp/*
this entry remove all files in temp directory every day at 8:30 AM
5,35 * * * 1-5 rm /home/{username}/temp/*
this entry remove all files in temp directory from monday to friday every hour at minute 5 and 35
30 8 * * * rm /home/{username}/temp/* >/dev/null 2>&1
this is the same as the first example but with no email notification and no log file
30 8 * * * rm /home/{username}/temp/* > /home/{username}/logfiles/emptytemp.log >/dev/null 2>&1
this is the same as the first example but with no email notification and the log file redirected to a custom location (
>
to replace the old log file with the new one, >>
to append new log file to old one)
Tuesday, March 24, 2009
a command line tool to download files from rapidshare in Linux

this is a useful simple tool to download files from rapidshare without visual tools. it's perfect if you want download files on your home pc from your office.
you need a valid premium account on rapidshare and wget installed on your pc. to install it: as root
yum install wget
create a new directory in your home directory (not as root!):
cd /home/your_user_name
mkdir .cookies
save a cookie in this folder with the following commands:
wget \
--save-cookies ~/.cookies/rapidshare \
--post-data "login=USERNAME&password=PASSWORD" \
-O - \
https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi \
/dev/null
copy and paste the following code and save it as "catchall"
#! /bin/bash
f=`date +%Y-%m-%d_%Hh%Mm%Ss`$RANDOM$RANDOM.log
if [ "$#" = "0" ]
then
echo url missing
else
a="$@"
wget -b -a $f --load-cookies ~/.cookies/rapidshare $a
fi
make it executable and copy it under
/usr/bin
: as root chmod +x catchall
then cp catchall /usr/bin
in your Premium-Zone Settings set as true the option "Direct downloads, requested files are saved without redirection via RapidShare"
now you can download any rapidhare file with the command:
catchall your_rapidshare_url_here
you'll get a different log file for each downloaded file. you can see the status of your download with this command:
tail -f log_file_name
Etichette:
command line,
fedora,
linux,
multiple downloads,
rapidshare,
wget
Friday, March 20, 2009
ctorrent: command line bittorrent client for Fedora
CTorrent is a BitTorrent Client written in C that doesn't require any graphical component, such as an X server.
To install it on Fedora: as root
Basic commands:
It's useful to simplify the command with the
If you need to launch it from a remote connection I suggest to use
To install it on Fedora: as root
yum install ctorrent
Basic commands:
ctorrent -p <port_number> -U <rate_max_upload_Kb> -D <rate_max_download_Kb> <file.torrent>
It's useful to simplify the command with the
alias
commandIf you need to launch it from a remote connection I suggest to use
screen
command
Etichette:
bittorrent,
command line,
ctorrent,
fedora,
linux,
torrent
Tuesday, March 17, 2009
screen command - multiple ssh session manager
screen is a multiple ssh session manager.
To install it on Fedora: as root
To create a new session:
To list all active sessions:
To connect to an active session:
To deattach an active session
To exit an active session
All command are case sensitive
To install it on Fedora: as root
yum install screen
To create a new session:
screen -S <session_name>
To list all active sessions:
screen -ls
To connect to an active session:
screen -r <session_name>
To deattach an active session
Ctrl+a
then d
To exit an active session
Ctrl+a
then K
or simply exit
All command are case sensitive
alias command
List of alias for current user:
Add alias:
Remove alias:
alias
Add alias:
alias ls="ls -al"
Remove alias:
unalias ls
Subscribe to:
Posts (Atom)