Ubuntu Servers :: Command Line To Copy File To Root Directory

May 12, 2010

I want to copy file from the Server cd drive and USB drive to the server root directory, but I haven't find any command of listing the cd drive or usb drive.

View 4 Replies


ADVERTISEMENT

General :: Command Line - Automating A Task - Copy All Subdirectories And Files From One Directory To Another

Jun 10, 2010

I need to copy all subdirectories and files from one directory to another ever 5 minutes or so, with the old data automatically being overwritten with the new data. I'd also like this to run at startup. Is there any way this can be done? If so, what program would I need to schedule the automation and what is the command line I would need.

View 2 Replies View Related

Red Hat / Fedora :: Root Directory - Password To Extract / Copy Any File

Jul 20, 2010

Why do I always need to write "su" then my password to extract or copy any file in fedora 11. How to configure so that I always be in my root directory.

View 3 Replies View Related

General :: Command Line - Move Or Copy Selected File

Jul 16, 2011

How do I move around select a file and move or copy it. All tutorials I have seen are not simple enough.

View 7 Replies View Related

General :: Copy A File To All Subfolders In A Directory Using A Single Command?

Jul 18, 2010

I'd like to copy a file, say widgets/water.txt, to all subfolders in the folder widgets using a single command. So if the folder widgets has 10 subfolders like widgets/blue, widgets/green, etc. I'd like to copy water.txt to all of them with one command.

I tried the commands

Code:

cp water.txt ./*/water.txt
cp water.txt ./*/

However these don't seem to work. The latter gives 'cp: omitting directory' errors.

View 7 Replies View Related

General :: Command To Copy The File Practice.txt To A New Name Of Myfile.txt While In The Home Directory-found

Nov 15, 2010

-the command to copy the file Practice.txt to a new name of Myfile.txt while in the home directory-found
-command to create a directory in the home directory-found
-say i just created a new directory called "test". whats the command to delete the test directory.-found
-command to create a blank, text file without using an editor.
-the exact syntax in Linux you would need to rename the file to a new name-found

View 4 Replies View Related

General :: Moving A File To The Root Of The Drive Via Command Line

Oct 17, 2010

How can I move a directory to the root of a drive via command line?

In MS-DOS it would be 'move C:/GAMES/QUAKE C:/'

What is the equivilent in Linux?

View 8 Replies View Related

Ubuntu Servers :: How To Unpack A *.deb File On Command Line

May 13, 2010

I put command sudo dpkg - unpack file.deb

server say need an action option

View 1 Replies View Related

Ubuntu Servers :: Executing PHP File Via Command Line

Nov 16, 2010

I have a php file that I need to execute via a cronjob. This file should be run by the www-data user as its a file in my /var/www/project folder. When I run this file under root (php -f cron.php) everything works perfectly, but I want it to run under the www-data to be safe. Before I run it vai crontab I tried it via command line as the www-data user and I receive errors:

Fatal Error: Allowed memory size of 8388608 bytes expired (tried to allocate 232 bytes).

But when I run it as the root user I get no errors and everything works correctly. The file cron.php is used to process automated tasks in my CRM. So I don't really want to have the root user running a crontab every few minutes for this.

Must the www-data user be given more permissions? I am using Ubuntu 6.06LTS
PHP - 5.1.2
Apache - 2.0.55
MySQL - 5.0.22

View 4 Replies View Related

Software :: Get First File Of Directory Then Copy To Other Directory Andd Rename The File?

Jan 30, 2011

I want to do the following.

1. have a directory full of subdirectory

2. Pick the first file from every sub and copy that to the main directory and also rename that file to the same name as the subdirectory's name

3. need to work in commandline best is a simple script.

View 4 Replies View Related

Programming :: C - Copy File Line By Line With Some Slight Changes?

Mar 2, 2010

In C, I want to make a program that will take a file and replace it with a file that's nearly the same but with some minor changes. Also, I would like to point out that I'm still fairly much a beginner with C. As for an example of the file, I want to take something like this:

Code:

Random Crap
More Random Crap
Even More
Something That Changes XXXXX

[code]....

I figured the best way to go about doing this was to open the file and a blank file, read the original bit by bit and when it gets to the point that needs to be changed exchange the part that needs to be changed with what it should be changed to, delete the original file, and rename the new one to the correct name. So the first problem I've run into (and I'll probably have more) is that when I'm trying to read stuff from the original file, my program doesn't seem to be finding the original. I'm sure much of my problems will be just from not knowing how to use the C functions so bear with me. Right now I have the following:

Code:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

[code]...

And when I try to run it I get the following:

Code:

Died Here: No such file or directory
Segmentation fault

Right now the length of 50 was just a random test length. Pretty much I was just trying to get it to read anything from the file. In the end I'm going to want it to read the entire file bit by bit, but at the moment I can't seem to get it to read anything.

View 11 Replies View Related

Ubuntu :: When Drag The File To Install It Again It Says Something Along The Lines Of It Cannot Copy A Directory Over A Directory?

Feb 19, 2010

I downloaded a mouse theme form gnome look and installed it in the themes. But it has not appeared in the pointer themes section in custimation even though it said that it is installed correctly.When I drag the file to install it again it says something along the lines of it cannot copy a directory over a directory.Where can I find where the mouse/pointer theme is located and delete it. I have searched filesystem, google and these forums and not had any luck yet.

View 1 Replies View Related

Ubuntu :: Copy Files Via Command Line?

Dec 14, 2010

I'm looking for a way to copy files with a certain file extension over to another folder. For exampleSource Folder: /home/user/downloadsFile Type: *.epubDestination Folder: /home/user/epubs/The downloads folder has several folders that may go as deep as 2 or 3 levels.I tried this but it didn't seem to work (and I'm not really sure what to do to modify it to get it to work).Quote:find . -maxdepth 1 -type f -exec grep -q "pattern" '{}' ';' -exec cp '{}' /path/to/destination

View 4 Replies View Related

General :: Copy A Read-Only File And Make The Copy Writable With A Single Cp Command?

Mar 1, 2011

How to copy a Read-Only file in Linux and make the copy writable with a single cp command in Linux (Ubuntu 10.04)? The --no-preserve and --preserve seemed to be good candidates, except that they should "and" the mode flags, while what I am looking for is something that will "or" them (add +w mode).

More details: I have to import a repository from GIT to Perforce. I want that all Perforce depot files are Read-Only (that is how Perforce was designed), while all other files that were derived/copied from depot files are writable. Currently if a Makefile tries to copy a Read-Only file then the derived file will also be Read-only. This leads to build-errors when cp tries to overwrite Read-Only file second time. Of course the --force is a workaround here but then the derived file is also Read-Only. Also I do not want to mess with "chmod" after each "cp" command - I will do that only as the last resort.

View 1 Replies View Related

Ubuntu :: Copy A Hard Drive From Command Line?

May 4, 2011

Ubuntu is getting stuck at the loading screen after an aborted attempt to upgrade to 11.04. It's my own fault - the install was running out of room on /, and I, like an idiot, decided to delete some package files under /var/something/archive, thinking they were "old"... I quickly realized they were in fact the new packages being installed... anyway after killing the thing and rebooting it is pretty damn broken (mostly because I can't get networking going so running in dpkg repair mode doesn't do much because, well, I deleted the packages).

I want to copy all the files off my /home and other meaningful partitions onto an external drive so I can just do a clean install. I can actually login to the command line under recovery mode, but I can't get the GUI started. I know it's possible to copy the contents of the partitions to an external

View 9 Replies View Related

Ubuntu :: Xfce4-screenshooter Copy To Clipboard From Command Line?

Mar 10, 2010

My xfce4-screenshooter GUI has the option Copy to the Clipboard, but I could not find this option in its' cI'm trying to bind printscreen key with this. I know that in order for the option to work I need to have the application always running (in GUI thre is option Close the application after screenshot , again somenthing that I can not find in command line).

View 9 Replies View Related

General :: Copy A Picture To Clipboard From Command Line?

Jun 24, 2011

I can copy image in Gimp and paste it to OpenOffice document.

How to do it (copy or paste image) from command line?

View 1 Replies View Related

General :: Copy-paste From Editor To Command Line?

Dec 23, 2010

I am trying to upgrade PHP on our linux box ( CentOS ) I copied the configure command from the phpinfo and now I want to execute that.I am not able to copy the command from an editor in linux to the command prompt, clicking the wheel om my mouse does not work, neither does shift-insert or ctrl-shift-insert.It does work in the editor itself.Is there a way to do this ?Or is there a way to execute the command in linux while it is in the file ? Like a bat file on Windows ?

View 14 Replies View Related

Red Hat / Fedora :: Root Line Passwd File Now Unable To Login As Root?

Jan 26, 2010

I edited the passwd file to modify the default shell for root from bash to tcshnow when I try to login to root it gives me the following error:"su: /bin/tcsh : No such file or directory"

View 3 Replies View Related

Fedora :: Script To Automate Backups - Storing Copy In Root Directory

Feb 4, 2010

Making a script. This is for my linux class. Basically when you run it, whatever directory it is in, zips everything, backs it up to the folder its in, and also makes a copy of it in the root directory. Here is what I have, but its not running right.

Code:
#!/bin/bash
echo
echo
echo "Automate Backups"
echo -n "Would you like to backup? Y or N:"
read answer1
if [$answer1 = "y"]
then
if [$USER = "root"]
then
echo
tar -cPvzf "$USER"_backup.tar.gz.`date +%F` /"$USER"/*
cp "$USER"_backup.tar.gz.`date +%F` /backups/"$USER"_backup.tar.gz.`date +%F`
echo "Successful Backup"
fi
echo
tar -cPvzf "$USER"_backup.tar.gz.`date +%F` ~/"$USER"/*
cp "root"_backup.tar.gz.`date +%F` /backups/"$root"_backup.tar.gz.`date +%F`
echo "Successful Backup"

View 14 Replies View Related

Ubuntu Multimedia :: Take Screenshots And Copy Image Files To Clipboard From The Command Line?

Feb 17, 2011

install imagemagick python, and pygtk.

Code:

sudo apt-get install imagemagick python pygtk

Now save the following script somewhere as imgclip.py. This is a simple python script which takes an image file and puts it in the gnome-clipboard.

Code:

#! /usr/bin/python
import pygtk
pygtk.require('2.0')

[code]...

View 1 Replies View Related

Ubuntu :: Command To Copy Files In Directory Created Within 2 Hours?

Apr 22, 2010

Is there a simple command to copy files that have been created within the past 2 hours?I've been looking through the man pages for unisonrsyncfindcpand I can't find anything I'm looking for.All I need is a simple command.Code:Copy folder a to b if created < 2 hours.

View 4 Replies View Related

Ubuntu :: Short Specification Of Root Director For Copy Command

Jan 18, 2011

I would like to copy a file from some random folder and send to a "Test" folder in root directory. But I havn't found how to specify the root directory without using ../ until i reach the root directory.i.e. suppose I'm in my random folder where I want to copy my file sudo cp somefile.txt (root???)/Test

what do i put for root?Just as additional explanation, if I have a Test folder in my home directory that i wanted to transfer to, then i could simply do cp somefile.txt $HOME/Test.

View 2 Replies View Related

General :: Command Line Way To View A Line Of A File With Context?

Feb 24, 2011

I'd like show a certain line or lines of a file with context, kind of like a unified diff, on the command line in Linux:

$ (something) -l 154 stuff.py
150: def foo(bar):
151: """

[code]....

View 5 Replies View Related

Ubuntu :: Burn A Directory To A CD (Command Line)

Aug 3, 2010

i need to burn a specific Directory (and all it`s content) into a CD by using the command line what do i need to write ?

View 1 Replies View Related

Ubuntu :: Get To The User Directory From Command Line

Oct 24, 2010

how do you get to the usr directory from command line.

View 5 Replies View Related

Ubuntu :: Set Custom Directory Icon From Command Line?

Jan 17, 2010

I am looking for a way to (via bash script) set a custom directory icon for a number of directories. All of these directories contain a "cover.jpg" image. I can accomplish this manually by right clicking the directory > select "Properties > click the directory icon button > select the "cover.jpg" image. I am just looking for the way to do this in the terminal to save time, as the music collection is quite large.

View 8 Replies View Related

Ubuntu :: Put All Of The Current Directory's Files On The Command Line?

Feb 21, 2011

Is there an easy way to put all of the current directory's files on the command line, without tab-completing each individual one?

View 9 Replies View Related

Ubuntu :: Difference: Run Program From Rc2.d Or From Root Command Line?

Mar 26, 2010

Example: In rc2.d I have S99test. In it: Code: #!/bin/sh mplayer -playlist "/music/Thom Yorke - The Eraser" Reboot; hear the loveliness; press pause (lirc setup)...still loveliness.

Login as root; "pkill mplay";hear nothing; "/etc/rc2.d/S99test"; more loveliness; press pause...silence! I know that i the former case, mplayer is assigned (for lack of a proper term) to a session, e.g. tty1. Not so in the latter. But why should a program like mplayer not receive (or ignore?) input from lircd, simply because it doesn't have a session? And how can I get mplayer (or any program run from boot scripts) to work with other programs (like lircd)?

View 1 Replies View Related

General :: Command Line 'last Directory' Button?

Jun 16, 2010

in the command line there's a button (tab) for autocompleting commands and I'm pretty sure linux has a button that prints the last directory I used/typed whatever?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved