Convert .flv to .wmv using bash.
Package needed: ffmpeg
Using the command shown underneath you can convert the movie extension .flv to .wmv real easily.
Package needed: ffmpeg
Using the command shown underneath you can convert the movie extension .flv to .wmv real easily.
This will work for: Red Hat / CentOS / Fedora
For Debian / Ubuntu: Please visit this website.
My server sends me a notifications for everything what happens on the server through e-mail, the only thing I had to check manually every time were the updates / upgrades for my Linux system. I figured there should be a way to get yum-update send notifications with available upgrades. So what we are going to do now is force yum to send an email when a update or upgrade is available.
First thing we need to do is open the yum config file.
# how to send notifications (valid: dbus, email, syslog)
emit_via = dbus
# should we listen via dbus to give out update information/check for
# new updates
dbus_listener = yes
# automatically install updates
do_update = no
# automatically download updates
do_download = no
# automatically download deps of updates
do_download_deps = no
Add these variables, and change “email_to” to your e-mail address:
Here is my working config file. You can also just copy and use this one and change the e-mail addresses.
# how to send notifications (valid: dbus, email, syslog)
emit_via = email
# who to send the email to:
email_to = email@example.com
# who send the notifications
email_from = yum-update@yourserver.com
# should we listen via dbus to give out update information/check for
# new updates
dbus_listener = yes
# automatically install updates
do_update = no
# automatically download updates
do_download = no
# automatically download deps of updates
do_download_deps = no
After saving the file. Restart notification yum-updatesd service.
Hi,
This is the automatic update system on yourserver.com
There are 9 package updates available. Please run the system updater.
Packages available for update:
firefox
kernel
cscope
kernel-headers
dnsmasq
kernel-devel
apr-util
xulrunner
apr-util-devel
Thank You,
Your Computer
Make a backup of a local hard disk on remote host via ssh.
Backup content of the hard drive to a file.
Make a copy of MBR (Master Boot Record) to floppy.
Restore MBR from backup copy saved to floppy.
Make a full backup of directory ‘/home’.
Make a incremental backup of directory ‘/home’
Restoring a backup interactively.
Synchronization between directories.
Rsync via SSH tunnel.
Synchronize a local directory with a remote directory via ssh and compression.
Synchronize a remote directory with a local directory via ssh and compression.
Make a incremental backup of directory ‘/home/user’
For more or better ways to backup your system using tar look here.
Copy content of a directory on remote directory via ssh.
Copy a local directory on remote directory via ssh.
Local copy preserving permits and links from a directory to another.
This command shows you information about who is logged in.
This gathers information about a domain name.
Query DNS servers for information about domain names
Ancient command to find out more information about DNS
Find the disk usage of a file or a directory.
(-sh = better readable | -ch = the same but larger output)
Disk freespace, pretty much self explaining but I use it with the -h switch to convert the bytes to megabytes or gigabytes
Find information about users.
Show who is logged on, and print: time of last system boot, dead processes, system login processes, active processes spawned by init, current runlevel, last system clock change.
Using this command you can create/convert a video with your own chosen logo. Have fun.
Updating your twitter status using the bash SHell in Linux is easier then you may think, you can update your status using “curl“, curl is a tool to transfer data from or to a server. All you have to do is execute this command showed underneath. This will transfer the status data to the twitter site using the Twitter API.
But of course, you don’t want to be typing all that every time you want to update your twitter status. So I found this website which has a executable twitter bash script.
Replace the user and password with your twitter user id and password. Now save the text to a file called ‘twitter‘ and give the file execute permission. Put this file in any folder in your path. If you want to use this script everywhere on the server make sure it’s located in /usr/local/bin or ~/bin. If you are a user on the server, you may just create the file in your ~/user folder.
If you have created the twitter file in /usr/local/bin or ~/bin you may use this command anywhere you are in the server.
For best results, enclose the message within quotes. This will prevent problems when using wild card characters like ‘?’
And if have created the twitter file in your ~/user directory, make sure you are in the same folder as the file and then you may use this command.
Did you make sure the file has executable rights?
You might need the package: unrar
You can check your server using the following command if you have already installed it or not.
If nothing shows up, install the package unrar. If you are using a Linux OS which uses yum update you can use the following command to install it.
If that does not work for you, you can simply install it manually using the next commands.
When that is all done, we can start using unrar. If you want to unrar multiple .rar files at once, you may use this command.
This code is incredibly handy; it allows you to schedule the time for a download to happen — say, at 3PM while you’re at work or midnight while you’re sleeping.