Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Monday, 24 July 2017

Copying files from my remote linux machine

Copying files from my remote linux machine


  •  Copying file
Source:  File vs.txt in the location /home/vineeshvs_logged_in/Desktop from the pc I have logged in.
Destination: /home/vineeshvs_remote_pc/Desktop in a remote pc in the same network with ip 10.107.104.1

scp /home/vineeshvs_logged_in/Desktop vineeshvs@10.107.104.1:/home/vineeshvs_remote_pc/Desktop
  • Copying folder
Source:  Folder vs in the location /home/vineeshvs_logged_in/Desktop/vs from the pc I have logged in.
Destination: /home/vineeshvs_remote_pc/Desktop in a remote pc in the same network with ip 10.107.104.1

scp -r /home/vineeshvs_logged_in/Desktop/vs vineeshvs@10.107.104.1:/home/vineeshvs_remote_pc/Desktop
{ Read More }


Convert your files into other Formats Online and for Free!

Convert your files into other Formats Online and for Free!


image It�s quite a hassle to convert files into different formats, as very often, you don�t have too many options to choose from, and are left helpless, not knowing what to do and where to find what you are looking for. How about I tell you that now it�s possible to do over 50 file conversions online, for FREE!

CometDocs is an all-in-one, user-friendly, file and data conversion tool that allows over 50 different conversions. The good news is that you don�t have to install anything on your computer� It�s available online.

How does it work?

  1. Select the file you wish to convert into a different format
  2. Choose the type from the options given (for example: from PDF to Excel)
  3. Enter your email address in the space provided
  4. Click on the button �Send�. Within no time, you will receive your conversion output via email.
  5. Download the file and bingo, the job�s done!

No hassles, no complications! It�s downright easy!

Make the job even simpler!

CometDocs allows you to convert 3 pages at a time if you haven�t registered with them. With just a one time �sign up� for an account with them, you can do away with all limitations.

  1. You will not be asked to enter your email address every time you want to use this tool.
  2. You will receive faster document conversions.
  3. You will also be able to retrieve them directly from the file manager and store the files there for use at a later stage.

It�s unique features:

  1. On the fly OCR conversion capabilities
  2. Over 50 different conversion options
  3. Proprietary XPS and PDF conversion abilities that retains formatting, images and text in the selected output format.

Interested in getting a list of CometDocs Conversion types? Visit the FAQ section on CometDocs.com to learn more.

Link: CometDocs

{ Read More }


Saturday, 22 July 2017

Copy files and change name with PowerShell

Copy files and change name with PowerShell




A friend of mine asked if I could copy files from one folder to another and rename them according to the following format

YYYYMMDDHHMMSS.ext

here  source code:


 cls 
$source="C: ext72source"
$destination="C: ext72destination"
set-location $source
$files=get-childitem -Recurse
foreach ($file in $files)
{
if (!$file.PsIsContainer)
{
$newName=$destination+""+[string]$file.LastWriteTime.Year +
[string]$file.LastWriteTime.Month +
[string]$file.LastWriteTime.Month +
[string]$file.LastWriteTime.Day +
[string]$file.LastWriteTime.Hour +
[string]$file.LastWriteTime.Minute +
[string]$file.LastWriteTime.Second +
[string]$file.Extension
Copy-Item $file.FullName $newName
}
}

Then change source and destination variable in the script.
{ Read More }


Friday, 7 July 2017

Copying Remote Files with scp

Copying Remote Files with scp


If you have ssh server running on a machine ,you can transfer files to/from it to any other machine connected over a network to it. The open-ssh server suite provides a utility named scp. Here are some examples of useful scp usage

Copy myfile to server
( ubg is my username on server1. You can replace server1 with an IP address or domain name. If the user names on the local machine and the remote server are the same you can omit it. See examples below.)

$ scp myfile ubg@server1:/tmp/
Password: ******

Copy remote myfile to local working dir
$ scp server1:/tmp/myfile /home/ubg/myfile
Password: ******

Use the -p option to preserve permissions and timestamps on the copied files:
$ scp -p myfile server1:/tmp/

If the SSH service is configured to listen on a port other than the default port 22, use
-P to indicate that port on the scp command line:
$ scp -P 12345 myfile server1:/tmp/

To do recursive copies, from a particular point in the remote file system, use the
-r option:

$ scp -r mydir ubg@server1:/tmp/

The above command will copy all mydir to remote /tmp
{ Read More }


Monday, 26 June 2017

Could not find this item when deleting files

Could not find this item when deleting files




If you have the following message adn you cannot remore the directory

run cmd  and after the following:

rmdir mydirectory /s          

(where mydirectory is the directory that I want to remove)

{ Read More }


Monday, 19 June 2017

Create RSS feeds OPML files with OPMLBuilder

Create RSS feeds OPML files with OPMLBuilder



FeedShow OPMLBuilder lets you create an OPML file from a list of RSS url or from the links included in any web page.

Use this link:


http://reader.feedshow.com/goodies/opml/OPMLBuilder-create-opml-from-rss-list.php
{ Read More }


Sunday, 18 June 2017

Copy Files to XBMC Live with sFTP and FileZilla

Copy Files to XBMC Live with sFTP and FileZilla


Here is a quick guide to connecting to XBMC Live via sFTP using FileZilla.  This will enable you to copy files to and from your XBMC Live installation.  By default XBMC Live installs an SSH server so you dont need to do any configuration on the actual XBMC box.

First you need to install FileZilla, if you are on Ubuntu just search for it in the Software Center or if you are using OSX or Windows you can download it here.

Next you need the IP address of your XBMC box, you can find this out by going to Settings->System Info->Summary



Now you have the IP address of your XBMC box open FileZilla and enter the following settings:

Host: your XBMC box IP address
Username: the username you chose during XBMC installation
Password: the password you chose during XBMC installation
Port: 22



*NOTE: if you did not do a HDD install of XBMC Live and are running it off a memory stick use the default XBMC Live credentials.
Username: xbmc
Password: xbmc

You can now easily copy files to and from you XBMC Live box.
{ Read More }


Thursday, 15 June 2017

Crontab UI easy and safe way to manage your crontab files

Crontab UI easy and safe way to manage your crontab files


Editing the plain text crontab is error prone for managing jobs, e.g., adding jobs, deleting jobs, or pausing jobs. A small mistake can easily bring down all the jobs and might cost you a lot of time. With Crontab UI, it is very easy to manage crontab.




Here are the key features of Crontab UI:

1. Easy Setup
2. Safe adding, deleting or pausing jobs. Easy to maintain hundreds of jobs.
3. Backup your crontabs.
4. Export crontab and deploy on other machines without much hassle.
5. Error log support

Fork me on Github

Setup

You have to setup crontab-ui on all the machines on which you want to manage crontab. Note that while running Crontab UI, you have to be on the same user as that of the crontab.

npm install crontab-ui
crontab-ui

Adding, deleting, pausing and resuming jobs.

Once setup Crontab UI provides you with a web interface using which you can manage all the jobs without much hassle.



Backup and restore crontab

Keep backups of your crontab in case you mess up.



Export and import crontab on multiple instances of Crontab UI.


If you want to run the same jobs on multiple machines simply export from one instance and import the same on the other. No SSH, No copy paste!


But make sure to take a backup before importing.

See when the job is going to run next.



Separate error log support for every job





These are some of the things I am planning to add in the future


1. Run jobs as different user in one place.
2. Profiling jobs.
3. Importing from existing crontab file.

Contribute

Fork Crontab UI and contribute to it. Pull requests are encouraged.




{ Read More }


Friday, 9 June 2017

Create Folder Files With No Name!

Create Folder Files With No Name!




1) Select any file/folder
2) Click on rename & press f2
3) Press& hold alt key.
while holding the alt key, type the number 0160 from the numpad

NOTE: No. press from right side numpad of the keyboard & then enter.
{ Read More }


Saturday, 3 June 2017

Create a file from varius files using win command

Create a file from varius files using win command


Let you have two separate file such as "A.avi "and "B.avi". Now you want to create a file C.avi that contain all of content of file A.avi and B.avi. In generally for this you have to want to use software but you can do this by windows command.

Process:
1. Open command prompt by "windows+r" write "cmd" and press enter.
2. Go to the drive where files having A.avi and B.avi by "cd D:" (D is the drive).
3. Write command "copy<space>/b<space>A.avi+B.avi<space>C.avi" and press enter.
4. Wait sometime until showing " 1 file(s) copied."


NB: In image my files was in F drives Download folder, and 3.avi creating from 1.avi and 2.avi.
Now you can see the C.avi is the compact file to A.avi and B.avi. By this process you can create all type of video files to one compact file.
{ Read More }


Friday, 2 June 2017

Create symbolic links for multiple files simutaneously

Create symbolic links for multiple files simutaneously


As simple as:
for file in $(ls <path>|grep <something>); do ln -s <path>$file <new_path>$file; done

{ Read More }


Wednesday, 31 May 2017

Convert text files to MP3 under Linux

Convert text files to MP3 under Linux


Even though I am not a fan of audio books and the only thing I use my iPod for is listening music still while exploring Festival(which is basically a General multi-lingual speech synthesis system) I found out that its very easy to convert normal text files into mp3 using festival . Now this could be especially useful for people who either listen to audio books or people who have difficulty in reading.

First we would need to install festival. We can install festival with the following command :

sudo apt-get install festival


Now we need to install voices which would be used to dictate the text (install any one of the following ) :

To install British Accented male voice issue the following command :

sudo apt-get install festvox-rablpc16k

To install American Accented male voice issue the following command:

sudo apt-get install festival festvox-kallpc16k


Now once you have installed festival and voice package we are ready to convert text files .wav files .

Lets say you want computer to read file named kaddu.txt you would need to pipe(send output of one command to other ) the cat command to festival. You can do so by issuing the following command :
cat -A kaddu.txt | festival --tts
Now instead if you want to convert kaddu.txt to kaddu.wav you can do so by piping the output of cat to a tool that comes with festival text2wave. You can do so by issuing the following command in the terminal window :
cat -A kaddu.txt | text2wave -o kaddu.wav
Now however if you want to remove special characters and want festival/text2wav to read only a to z,A to Z, space, �,�,�.�,�!�,�?�. You can do so by piping the output of cat to sed and then piping the output of sed to text2wav/festival.
cat kaddu.txt |sed s/[^a-zA-Z .,!?]//g|festival --tts

or
cat kaddu.txt|sed s/[^a-zA-Z .,!?]//g|text2wave -o kaddu.wav
Now the (.wav) file produced is uncompressed and are huge in size so you might like to convert it to mp3 to reduce its size and to allow the files to be played on iPod or any other mp3 player. You can convert .wav files easily to (.mp3) file format by using lame .

To install lame issue the following command in the terminal window :
sudo apt-get install lame
after istallation is over to convert say kaddu.wav to kaddu.mp3 issue the following command :
lame -f kaddu.wav kaddu.mp3
NOTE : I am using -f switch here which basically encodes mp3 file faster and in lower quality .

Article Written by : Ambuj Varshney (blogambuj@gmail.com)
For Desktop on Linux Blog , http://linuxondesktop.blogspot.com
(C) 2008 , Ambuj Varshney

{ Read More }


Friday, 26 May 2017

Converting IMG files to ISO images

Converting IMG files to ISO images


Some time you will find CD images with .img extentions. Most probably such images are created by clonecd, a windows program.

IMG files are raw-data copies of optical media and are primarily used  to  store  CDs with  odd  properties,such as sectors which need to have read errors when read. Conversion to ISO format removes this  information,as ISO format does not support this.

You can manipulate  such images if you install ccd2iso package.
   sudo aptitude install ccd2iso

  You can  convert  img files to iso files as shown below.
    ccd2iso file.img file1.iso
 IMG  files almost always include a SUB file, which contains additional data for the disc format, and a CCD file, which is a plaintext configu-ration file describing the disc layout.ccd2iso does not make use of  these files

  
{ Read More }


Thursday, 25 May 2017

Converting DVDs to Good Quality AVI Files Part 2 The Procedure

Converting DVDs to Good Quality AVI Files Part 2 The Procedure


Forget the why and wherefores of what were doing - Thats part one which you can read here.

Lets get started;

Ingredients
  • A computer with a large hard drive 20GB Free? Pentium 4 3GHz or Faster and a DVD drive
  • A copy of DVD Decrypter - its free
  • A copy of AutoGK - its free


DVD Decrypter
http://www.dvddecrypter.org.uk/
This software allows you to copy the files from a DVD to your hard drive. The project was shut down some years back but its still possible to get hold of it on the internet.

An alternative to this is DVD Fab. Theres a free version and a commercial version. The difference between the two is that the commercial version handles more DVD protection schemes. http://www.dvdfab.com/free.htm


AutoGK
http://www.autogk.me.uk/
AutoGK is short for Auto Gordian Knot which describes a knot so difficult to untie that it was cut instead. Its quite apt considering the purpose of this tool.

Its not a single piece of software but rather installs several pieces tied together by a single front-end. As a result, the setup program will spawn other setup programs. Watch them carefully because otherwise windows will get popped over and youll think the install has frozen when its really just waiting for input. All of the pieces of software in AutoGK are well worth having.

PART 1: Getting the files onto your PC using DVD Decrypter
  1. Put the DVD in your computers DVD drive

  2. Start DVD Decrypter - it should detect the disc

  3. It might also prompt for the region code (if it finds RCE protection)

  4. Look at the list of files - theyre named confusingly but the first number is the "title" and the second is the part.
    VTS_01_3.VOB means
    Part 3 of the first title.

    VOB files are video
    IFO files contain informtation about the VOB files.
    I dont know that BUP files are.

  5. You can either manually select all of the series of the largest files or you can click View, Select Main Movie Files plus IFO files.

  6. Next, Click on Tools, then Settings.

  7. Click the tab marked File Mode and in the options section make sure that File Splitting says NONE.

  8. Then Click on IFO Mode and again, in the options section make sure that File Splitting says NONE.

  9. Choose a location to save in.

  10. Then click the DVD to file Icon to start the decryption.

  11. It will take a while, so go find something to do for 15-30 minutes.

PART 2: Converting the VOB to an AVI
  1. Start AutoGK

  2. Click on the little folder icon marked Input file and browse to the folder where you saved the output of DVD Decrypter.

  3. If everything went well, you should have a single VOB file and a bunch of IFO files. Only one IFO file will match the VOBs name.


  4. Open this in AutoGK.

  5. It should read in the VOB and display soundtracks and subtitles.

  6. Click on the little folder icon marked output file and chose a location and name for your output.

  7. Have a look at the audio and subtitle options. Youll want to pick one audio track - usually the top one. It might not matter so much about subtitles unless the movie is in a foreign language. If, like me, you prefer to have a subtitle track, you enable it here but it will be "burned in" to the movie. Its often easier to download a subtitle track in SRT format from Podnapsi later.

  8. Next youll want to select a file size.

  9. If you movie is about 90-100 minutes, you should be ok with 700MB but if you movie contains a lot of action scenes (or is long) consider increasing the size to 1400MB. Youll end up with much better quality.

  10. Next, click advanced settings and make sure that the resolution is set to Auto Width and the Audio is set to Auto. Note: If you were making a copy for a portable device like a phone with low resolution, these are the settings you might change.

  11. Choose an Video codec. XviD is recommended though DivX works well too.

  12. Leave the subtitles options unchecked and click ok.


  13. Finally, click Add Job and then click Start.

  14. You might think that nothing is happening but it will actually be working. It shells out to a DOS/Command line app for a lot of the work.

  15. Depending on your computer, the settings you chose and the movie you are converting, it could take 3 hours but at the end youll have a good quality AVI file.
If you right-click on that file and choose properties youll be able to find the frames per sec. Use that number to find a matching subtitle file on Podnapsi.

Note that if you cant figure out which track is which, you might want to try playing the VOB file directly in VLC Media Player. You can switch audio tracks in there and figure out which one youd prefer.

Easier Instructions
Of course, I didnt figure all of this out myself and if youd prefer video instructions, you might want to check out my inspiration on You Tube.

{ Read More }


Monday, 15 May 2017

Create and mount VHD files

Create and mount VHD files


Microsofts Virtual PC creates its virtual machine hard drives in VHD files, and Windows 7 can now mount these directly so you can access them in the host system. Click Start, type diskmgmt.msc and press Enter, then click Action > Attach VHD and choose the file youd like to mount. It will then appear as a virtual drive in Explorer and can be accessed, copied or written just like any other drive.
Click Action > Create VHD and you can now create a new virtual drive of your own (right-click it, select Initialise Disk, and after its set up right-click the unallocated space and select New Simple Volume to set this up). Again, youll be left with a virtual drive that behaves just like any other, where you can drag and drop files, install programs, test partitioning software or do whatever you like. But its actually just this VHD file on your real hard drive which you can easily back up or share with others. Right-click the disk (thats the left-hand label that says "Disk 2" or whatever) and select Detach VHD to remove it.
The command line DISKPART utility has also been upgraded with tools to detach a VHD file, and an EXPAND command to increase a virtual disks maximum size. Dont play around with this unless you know what youre doing, though - its all too easy to trash your system

To do this, then follow these steps:

A- Mounting a VHD File
1- Click Windows Start button, type diskmgmt.msc, and press Enter.
 2- Click now Action > Attach VHD.
3- Click Browse button to locate your VHD file, then click OK to mount it.
Thats it. Your virtual drive can be accessed now in Explorer and can be manipulated like any other drive.

B- Creating a VHD File

1- Click Action > Create VHD.
2- Click Browse to select where you want to save your virtual hard disk, enter disk size, select Fixed size, and click OK.
Thats it
{ Read More }


Saturday, 29 April 2017

Convert PDF to DOC files

Convert PDF to DOC files


PDF2Word (pdf to word) software enable export the text, images and other contents from pdf document into word document, so you can reuse your PDF content, pdf to word software will preserving text, layout and bitmap images in the generated word document.

PDF2Word (pdf to word) software is a standalone program and does not require Microsoft Word, Adobe Acrobat, or even Acrobat Reader.

Here are some key features of "PDF to Word Converter" :
� Convert PDF files into Microsoft Word documents;
� Batch PDF to Word Conversion;
� Standalone software, MS Word, Adobe Acrobat and Reader NOT required!
� Support Command Line Operation (for manual use or inclusion in scripts);
� Automatically resize PDF page to fit your requirement;
� Accurately preserve Text, Pictures, and Layout;
� PDF to Word is easy to use;
� Support multiple document conversions (Batch Processing);
� Support drag and drop files and batch conversion;
� Support PDF1.6 protocol (formerly only supported by Acrobat 7.0);
� Converted files can be automatically loaded immediately after conversion complete;
� Support page ranges (all, from to, individual pages);
� Support English, French, German, Italian and other languages;
� Support delete graphics and pictures from the generated Word document;
� Support encrypted PDF files;
� Five reconstruction modes for PDF to Word conversion;
� Convert PDF file to flowing MS Word document without text boxes;


Download Convert PDF to DOC files
{ Read More }


Tuesday, 25 April 2017

Converting DVDs to Good Quality AVI Files Part 1 The Waffle

Converting DVDs to Good Quality AVI Files Part 1 The Waffle


Im very much a believer in the idea that "files" will be the next big format for video entertainment after DVDs. I guessed right from the start that blu-ray would win the format war against HD-DVD but I never thought that either would take over.

About 15 years ago, after having ridden the music upgrade from LP Records to tapes and to CD, I stumbled across this "new" format called MP3. Back then, there were no MP3 players, just computers but I was enthralled by the idea that with enough storage, I could save my music collection in a way that meant that I could play them without ever having to get a CD out of the cupboard again.

I emarked on a quest to convert my entire library of Music CDs to MP3. People thought I was weird but a few years later as MP3 players became more readily available, I reaped the rewards. I didnt have to convert anything - it was already done.

I see video entertainment as following the same path. As with my early MP3 conversions, the problems were two-fold.
1. Finding a reliable converter/process
2. Storage

Recently, I bought a Western Digital WDTV box (mainly so that I didnt have to burn Doctor Who episodes to DVD when downloading them from the UK). Copyright people; dont give me those accusatory stares - I buy the DVDs when they become available. Its just that the net has a bad habit of "spoiling" the twists when I wait for Australia to screen them - yes, even when its only one week later.

Of course, I dont want to stop there. Its my ambition to convert my sizable DVD collection to files for discless viewing - and perhaps Ill throw in a few fixes along the way.

Fixes? you say? Huh..?

As a partially (mostly) deaf person, I find that I really need subtitles with my movies - and Im really annoyed when they arent provided. Recently I bought Mozart and the Whale. Unfortunately the Australian distributor of this film doesnt care about subtitles. I ripped it to AVI format and then I went looking on http://www.podnapisi.net/ for a subtitle file (SRT format). I managed to get one and now when I play the file in VLC Media Player - or on my WDTV player it works!

The final question is one of quality. We can get close to movie quality in AVI format (with a big enough file - 800MB for a movie) but sound is a problem. Its MP3 format. I used to care a lot about surround sound but since Im deaf, it really doesnt make a whole lot of difference to me. Still, sound and quality are important considerations. For now, the AVI format will do but Im on the lookout for something better.

When a royalty-free file format capable of holding, video, 3d video, multiple angles, multiple subtitles, various soundtracks, chapters and display covers appears, Ill jump there pretty quick.

Next time; Enough of the Waffle - Next time Ill explain how to rip a DVD to a good quality AVI file using free tools.
{ Read More }


Saturday, 22 April 2017

copy directory structure copy files with directories

copy directory structure copy files with directories


Q. How can I copy a directory tree without copying files?
A. Enter the root of the tree you want to copy. The tree will be recreated under /destination/
$ find -type d | xargs -i mkdir -p  /destination/{}


Q. How can I copy the files and recreate the directory tree the file is in. I.E. copy the file along with the whole or part of the directory tree.
A. Enter the folder you want to be the root of the copied tree. Suppose I have /home/me/work/urgent/files/x.htm copied to /destination/ starting from me/ folder. Enter /home/ and type:
$ echo  me/work/urgent/files/x.htm | cpio -pdvm /destination/
#search for files and copy all found with their dir trees
$ find . -name *.htm |cpio -pdvm /destination/
{ Read More }


Wednesday, 19 April 2017

Create Folders And Files With NO! Name

Create Folders And Files With NO! Name


This trick will allow you to create files and folders without any name.

Just follow the steps as given below :-

1) Select any file or folder.

2) Right click on it, select Rename or simply press F2.

3) Press and hold the Alt key. While holding the Alt key, type numbers 0160 from the numpad.

Note :- Type the numbers 0160 from the numpad, that is, the numbers present on the right side of the keyboard.
Don�t type the numbers which are present on top of the character keys.

4) Press Enter and the nameless file or folder will be created.

Reason :- The file or folder that seems nameless is actually named with a single space.



But what if you want to create another nameless file or folder in the same directory ?
For this you will have to rename the file with 2 spaces.
Just follow the steps given below :-

1) Select file, Press F2.

2) Hold Alt key and type 0160 from the numpad.

3) Release the Alt key. Now without doing anything else, again hold Alt key and type 0160.

4) Press Enter and you will have second nameless file in the same directory.

5) Repeat step 3 to create as many nameless files or folders in the same directory.

(We have a problem with deleting these folders, to do so, start your computer in Safe Mode and delete it from there.)
{ Read More }


Wednesday, 5 April 2017

Count the Occurence of All Words in a Number of Text Files

Count the Occurence of All Words in a Number of Text Files


Recently I was given the task to analyse a range of files (around 300) and count the occurrence of all the words in each file. So the aim was to put together a piece of code that goes through all files in a directory, reads in a file, lists all the words occurring in it and counting how many time each word has occurred.

I quickly found out that in case of a single file the process is rather simple, the following code does a fine job,

for w in `cat FILE.txt`; do echo $w;done|sort|uniq -c >> results.out
This code reads in FILE.txt and for each word in it counts its occurrence and the creates a list from it.

However putting this into a recursive script was a little more complicated. So I took another direction and found a piece of code using sed to do the same job on a single file. With this and some scripting knowledge I was able to put together just what I needed.

Additionally, I used the command basename to output the name of the file so I know which file was which.

The final piece of code looks like this,

for file in `ls /PATH/TO/DIRECTORY/`
do
basename /PATH/TO/DIRECTORY/FILE >>
results.out        sed s/ /n/g /PATH/TO/DIRECTORY/FILE | sort | uniq -c | sort -nr >>  results.out
echo "" >>  results.out
done

This does a perfect job and creates a single file with the output containing,
  • File name of each file
  • Occurrence of each word in the file, sorted from high to low
  • Empty line to separate data from each other
If anyone has any other suggestion or comment I am happy to hear it!



{ Read More }