General :: "cp" Command - Called BACKUP And Is Initially Empty

Jan 10, 2011

I'm in a directory containing various files and subdirectories, one of which is called BACKUP and is initially empty, what exactly happens if I launch the following command line:

Code: cp -R . BACKUP???

If I'm not mistaken, all the content of the current directory should be copied into the BACKUP directory, apart from the directory BACKUP itself. Actually I get a message saying something like:

Code: cannot copy a directory onto itself BUT when I look into the BACKUP directory I find another directory called BACKUP which I did not expect to find. Moreover, if I launch the same command again I get the same message (repeated two or more times) and then I find that inside the "second" BACKUP directory there is a third one, with the same name again. In other words, every time I launch the command I get a deeper tree of "BACKUP" directories, as if the command was messing everything up. I know that most probably I'm the one who's messing things up and I also know the "problem" can be easily bypassed by using as a destination for the copy a directory located elsewhere, but I'd like anyway to understand the reason for such a behaviour.

View 3 Replies


ADVERTISEMENT

Ubuntu :: Real Time Backup In A Folder Called /home/backup?

Feb 2, 2011

I've tried to google but not much luck. What I would like to do is have anumber of folders on my desktop and their contents, replicated/duplicated into another folder on the same PC in real time. So for example, if I were to change an OpenOffice document in a specific folder on my Desktop it would be replicated/duplicated in real time. If I had three folders on my Desktop A, B and C they would also appear/be backed up (in real time) in a folder called /home/backup. Can this be done?

View 3 Replies View Related

General :: Command To Empty Recycle Bin?

Oct 15, 2010

Simple question but even google does not come up with an answer, seems to be too easy that someone else asked it ;). Could anyone tell me what is the shell command to empty the garbage bin under Linux?

View 3 Replies View Related

General :: Empty Bash Command Line?

Sep 28, 2010

I am looking for a way to delete the currently entered commandline without wasting seconds on the "Backspace"-key.

For example I scrolled the bash history and have a long commandline that would execute when I pressed ENTER:

~$ aptitude search openssl | grep dev

But now I decide that I do not want to execute this command. Can I get an empty prompt fast without deleting the whole line with Backspace? On the Windows "cmd" you can just press ESCAPE and it is gone. This behavior would be what I want.

The question may seem trivial but this is bothering me for a long time now.

View 2 Replies View Related

General :: Command Not Found For All But PWD And Echo - Path Empty

Mar 1, 2011

I logged into my Red Hat Enterprise Linux machine at work (use it for software development) and the primary GUI does not load. Instead, widgets appeared for xclock, xterm, and Firefox. In the terminal, I start typing in commands to try to figure out what's going on, but all commands are not found except pwd and echo. I 'echo $PATH' and that returns just an empty, blank line. 'echo $SHELL' lets me know I'm using cash.

The likely cause was my attempt to install Adobe Reader Firefox plugin yesterday. After it downloaded, I ran the binary but Firefox didn't seem to recognize that I had installed it, so I went into my .cshrc file and added the adobe folder to the path. That didn't seem to work, so I gave up, deleted the binary and the folder I installed to, and removed that directory from the path in the .cshrc file. This last thing (the export PATH line in that file) I'm certain is back exactly as it was before.

I have successfully added the /bin and /usr/bin back to the path from command line via
setenv PATH /usr/bin:/bin
but of course it doesn't stick after reboot nor does it magically load the primary GUI. I'd rather not go through the effort of creating a ticket for our company's Global Service Desk cuz there's no telling how long that could take to resolve. In the meantime, I can't do any programming.

View 23 Replies View Related

General :: Resizing Initially Installed Logical Volume?

Oct 26, 2010

Back in the day, I foolishly installed my Fedora server with the default logical volume layout on one physical volume. Knowing now that this is a huge waste of space (partition is large) I'd like to reduce the logical volume and somehow detach this now unused space and mount as a normal partition. Is this possible? Only 20GB of the 160GB has been used for the OS. Home partition is on a secondary disk.

View 9 Replies View Related

General :: Backup With DD Command?

Jul 21, 2011

my laptop has a 320 GB hdd which is dual booted with win 7 and linux mint.If i remember i dont think i am using the entire 320 GB from the hdd,may be around some 200 GB.If i use a DD command and back it up to an external 500 GB hdd,will it back the entire 320 GB or only the data which is of 200 GB ?

I want to have a full backup of my HDD ,incase the hdd fails in laptop i can mirror it to a new hdd from the external hdd.

View 1 Replies View Related

General :: Bash Prompt / Looks Fine Initially, But There Seems To Be A Hidden Error?

Jun 1, 2011

I've written custom prompts for several boxes but this one has an error I just can't identify and need a second set of eyes to help solve it.

I've set the following as my prompt: PS1="[e[30;42m]u@h[e[0m][e[30;47m] #][e[0m][e[32;1;40m]w>[e[0m] "
(hostname/un obscured & image enlarged slightly to make it easier to read.)

Everything looks fine initially as you can see here:url

1- It sets the username@host in back on green text.
2- It then changes to an off-white an prints the command number for the terminal.
3- Next, changes to a green on black font and prints the working directory.
4- Finally is prints a ">" character and a space.

The problem occurs when I try to "up arrow" to reuse and/or edit a prior command. It prints the prior command fine, but if I arrow over to edit the command sometimes the first character can not be deleted from displaying as you can see in the following composite screen-shot

url

Here I did a simple ps and piped it through grep. After getting the output, I up-arrow to repeat the command. As you can see by the second section the cursor only goes back to the "s" in ps. The "p" can not be deleted. Hitting enter just displays a new line, so the "p" was just a ghost being displayed and not really there.

View 2 Replies View Related

Programming :: Using Command-line Options With A Program That's Called Using Env

Oct 11, 2010

I thought about this a while ago when reading through a Python tutorial and I googled some and couldn't find an answer. Now I want to know it for Ruby, also, and it's more important now because I want to invoke Ruby with -w.

How can you use:

Code:

with a -w option to ruby, like:

Code:

This doesn't work and I can't find an explanation of how to do it.

Code:

View 1 Replies View Related

Programming :: Destructor Called On Objects In Deque Without It Being Called Explicitly

Jul 13, 2011

I feel there's a bit of a misunderstanding going on between C++ and me...My problem is that I have a deque of pointers to a class, and create objects then add them to the deque in a for loop. However, the destructor is called on the object as soon as the loop quits.

Code:

This prints:

Code:

Now, if I change the deque from deque<Test*> to deque<Test> then it works fine - I get:

Code:

However, I can't do this with my actual code, because I am creating a deque of pointers to an abstract class, so it won't let me instantiate the class. (This is all so that I can take advantage of polymorphism, and call functions on a set of similar objects without worrying what type of object I'm dealing with).

So, I suppose my question is: what is the correct way to create that deque of pointers to the abstract class? I don't seem to be barking up the right tree currently.

View 4 Replies View Related

General :: Rsync Command - For File Backup ?

Mar 23, 2011

I'm going to be using this command to back up my files:

Should I change anything or is it ok?

View 4 Replies View Related

General :: Backup Program / Command For Ubuntu?

Apr 3, 2011

I'm new to Linux and I am currently using the Ubuntu distro. What I'd like to know is whether there is a program or command I can use to back up my hard drive with Ubuntu? I have an external drive that I can use for this purpose but I don't know how to set it up for Ubuntu or Linux generally.

View 2 Replies View Related

General :: Backup - Any Copy And Verify Command In Ubuntu?

Dec 5, 2010

I back up all my digital photos to a couple of places. I've been using the cp command, but--given the personal value--have started to wonder if there's a more reliable way. I'm no stranger to Linux, Bash, Perl, etc., so I could write something to copy and compare md5 hashes, but I was wondering if something already exists (reinvention, wheels and what-not).

Most of my googling for copy and (verify|valid|check|hash|confirm) turns up rsync. However, as far as I can tell, rsync only uses hashes to see if a file needs to be updated. It doesn't perform a hash comparison afterward. For this use, specifically, the files are binary and typically 8-10MB.

View 3 Replies View Related

General :: Dump Command Backup Entire File System?

May 22, 2010

Does the dump command back up entire file-systems or is it capable of backing up subsets of a file-system? And is tar capable of taking device names (for file systems) as input to be archived?

View 1 Replies View Related

Ubuntu :: Sed Command Empty The File?

Mar 13, 2010

I have this file: 1.txt, with this contents:

Code:
test
mycomputer

I just try change the string "mycomp*" by "othercomputer":

Code:
sed 's/mycomp.*$/othercomputer/' 1.txt > 1.txt
but sed command empty the file.

[Code].....

View 2 Replies View Related

Ubuntu :: Allow Empty Return From Read Command?

Feb 19, 2010

I am writing a short script to do some backups.Here is a small section of it:

Code:
echo -n "Please enter your choice ..."
read CHOICE

[code]....

View 3 Replies View Related

Ubuntu :: Empty Trash Command For Files (Desktop Recycle Bin)

Aug 28, 2010

I mount /home on a logical partition. Files and directories that I trash from here go nicely into the recycle bin, and I can right click on it and choose "Empty Trash" with no problem. Files off of the root directory in directories that I "own" (i.e. /mydir/*) do not play as nicely. I went ahead and followed instructions from another post, namely:

Code:
sudo mkdir /.Trash
sudo chmod 1777 /.Trash

And after trashing some files from /mydir, there is indeed a subdirectory with my uid (1000) and files that I trash from /mydir are going in there. However, the recycle bin on my desktop remains empty, and the only method I have for deleting said files is by deleting them from the /.Trash/1000 folders through the command line. So my question is: Is there anyway that I can trash files from /mydir, see them appear on the desktop recycle bin, and empty the trash without the need to rm them directly through the command line? Not sure if it will help, but here is my fstab:

Code:
# / was on /dev/sda1 during installation
UUID=4129f389-92be-459e-8bbc-928c1440f718 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=6a30914d-04a3-4b03-85bd-2bf16a68a41a /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=f388cf04-bbd6-4bf9-9d69-0778b0f158fd none swap sw 0 0

View 7 Replies View Related

Fedora :: Trash Icon Stays Full On Empty Command - No Hidden Files

Apr 26, 2011

Using Fedora 14 with Gnome 2.3 Desktop utilizing Compiz and Emerald theme manager. When I empty the trash, the icon is still the FULL Trash icon. I tried using different Emerald Themes, and different Icon sets, but still the Trash Icon stays full. I checked the trash folder in $HOME/.local/share/trash and found nothing, no hidden files.

View 3 Replies View Related

General :: Shell Scripting \ (test If A File Is Empty, If It Is Then Display "file Is Empty" Otherwise Display "file Is Not Empty")?

Oct 5, 2010

I am a final year student doign Computer systems engineering and just been introduced to linux. While still strugling to catch up with the commands, I am now given an assignment under shell scripting.I seriously am strugling to understand this question, can you please assist me.Here follows the assignment:

Operating Systems III
Some tips
e.g. (test if a file is empty, if it is then display "file is empty" otherwise display

[code]....

View 10 Replies View Related

General :: "find" Command In Backup/zip Script?

Feb 13, 2011

I am fairly new to scripting and I am trying to write a script that finds and zips a file named file1.xml from multiple sub-directories. So basically I want to find them and zip them all together. The disk directory structure is as follows:

/mnt/data/user_name1/db/file1.xml
/mnt/data/user_name2/db/file1.xml
(etc, etc where user_name varies)

This is what I have so far, but I keep getting an error relating to the -name command.

filename=`date +%d%m%Y-%H:%M`
find /mnt/data/ -name file1.xml -maxdepth 2 -type d | zip -rp $filename.zip -@

I keep getting the following error but don't know how to fix it. Is what I am trying to do even possible?find: warning: you have specified the -maxdepth option after a non-option argument -name, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).

View 4 Replies View Related

General :: Write A Simple Backup Script To Backup A Single Folder Nd?

Sep 15, 2009

I am trying to create a backup script that will back up a single folder for a class i am in. I was wandering if I could get some help. If possible I would also like to know how to write a script that can encrypt that same file . I will be putting the back up in my /home/usr/Backup directory. I am not trying to back up my whole system just a single folder. I am using Fedora 11

View 2 Replies View Related

General :: Mount Point For Backup Drive - Partition To Backup The Important Files On My Main HDD

May 21, 2011

I'm just setting up a partition on a seperate HDD in my system. I plan to use the partition to backup the important files on my main HDD (to guard against HD crash).

The question I have is about where would be the typical location to auto mount this partition? Which would it be normal to go for:

1. /backup/
2. /media/backup/
3. /mnt/backup/
4. /home/chris/backup/

View 7 Replies View Related

General :: File Is An Automated Backup Script, Backup.sh?

Sep 13, 2010

Can some one give me a sample of a crontab for backing a directory please, System is Ubuntu 9.04Quote:

#!/bin/bash
# this file is an automated backup script, backup.sh.
# this backs up my domain site.

[code]....

View 7 Replies View Related

Ubuntu :: Firefox 4 Takes Forever To Load Initially?

May 23, 2011

When I start Firefox 4 on my Ubuntu 10.4 laptop, it takes about a minute for Firefox to actually load and display itself.

View 5 Replies View Related

Ubuntu :: LUbuntu - Checkin It Out - Libreoffice Isn't Initially Installed

Jul 25, 2011

I started using lubuntu and I gotta tell ya, this is running smoking hot on my system. Though, I was curious, what are the limits of this thing? Do any of yall use it? Noticing that Libreoffice isn't initially installed. Can it run that ok?

View 9 Replies View Related

Ubuntu :: Desktop Menus Are Not Initially Visible After Boot Up

Jul 31, 2011

I'm experiencing a two or three problems with (I think) the Unity desk top. I'm not sure they're related so I'll post them as separate threads. Here's the second.

When I boot up Ubuntu the initial desktop related menus, which should appear at the left hand side of the top menu bar, are not visible until after I've launched and then minimised an application (doesn't appear to matter which application). Once I've done that the menus reappear.

View 2 Replies View Related

Debian :: Dd Command - Backup Over LAN

May 10, 2010

My church is planning to purchase a NAS serving 9 PCs running Windows and Linux respectively. The new device apart from storing data, mainly photo, is expected to be used for backup keeping all PCs images.

I have been googling a while unable to find a solution running dd command over LAN.

View 9 Replies View Related

General :: The Directory Would Not Exist Until 'mv' Has Been Called As In?

Jul 3, 2011

I want to copy a file from an old directory to a new directory and ideally I would like that the 'mv' command itself could create the directory for me in one step...That is to say that the directory would not exist until 'mv' has been called as in:Code:mv olddirectory/file.dat newdirectory/file.datso mv would create the directory 'newdirectory' in the above call....I am not sure if this is possible however, that is to say I think it may be necessary that the directory 'newdirectory' already exists before I make the above call to mv, as when I make try the above call when 'newdirectory' doesn't exist I get the following error:Quote:mv: cannot move `test1/4215/4215-001R.fit' to `test2/test.fit': No such file or directoryso to sum up, my question is:is there some paramater for 'mv' that I can change so that it will create the new directory as well as copy the file and if not, are there other commands that might do this?

View 3 Replies View Related

General :: Pset Profile To Be Called Only Once?

Mar 24, 2010

Profile is getting called twice for every login change. Interestingly when i use SU, it is invoked once only. how to set profile to be called only once.

View 3 Replies View Related

Ubuntu Multimedia :: Logitech Camera - Seems To Be Detected Initially But Dropped Later

Nov 17, 2010

Have logitech camera, seems to be detected initially, but dropped later for some reason.

[Code]...

View 1 Replies View Related







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