Programming :: Smbmount - Find And Copy ?

Nov 19, 2010

I have the following code and would like to copy all the found files within the if then loop.

Code:

I can pipe it to a file then run a smbclient get on the file listing but there must be a better way to do this.

View 4 Replies


ADVERTISEMENT

General :: Why SMBmount Not Attempt Working

Aug 10, 2010

I can successfully access one of our local samba shares, which is on a windows pc (called marina) as follows:
$ sudo /usr/bin/smbclient \\marina\resource_library <my password>
Domain=[MARINA] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
smb: >
So, that works. I'm now trying to mount the above location (the resource_library folder on marina) to /mnt/resource_library (as a read only folder), but it keeps failing - I've tried a few variations of specifying the location:
$ sudo smbmount \\marina\resource_library /mnt/resource_library -o username=max,password=<my password>,r
mount error: could not resolve address for marina: No address associated with hostname
No ip address specified and hostname not found
and
$ sudo smbmount //marina/resource_library /mnt/resource_library -o username=max,password=<my password>,r
mount error: could not resolve address for marina: No address associated with hostname
No ip address specified and hostname not found
And both of the above with MARINA instead of marina.

View 3 Replies View Related

Ubuntu Networking :: Smbmount Not Showing All Files / See Those Remaining?

Mar 17, 2011

I have a Ubuntu 10.10 all updated on a Quad core with 4gbs of Ram.

Accessing by ssh to a server (2.6.11-gentoo-r6 i686 Intel(R) Xeon(TM) CPU 3.20GHz) I have 30 folders with 771 mpeg files each folder. code...

View 1 Replies View Related

General :: Permission Denied On Smbmount Ed Network Drives?

Mar 23, 2010

I can not write to any directories mounted.I have included the below info as my issue outgrew nmy original thread here:

debian:~# ls -l /mnt/net/flac/
total 0
drwxr-xr-x+ 16 999 root 0 2010-03-20 10:19 gd_1976_project_7

[code]....

View 15 Replies View Related

Ubuntu :: Mount A Windows Share Using Smbmount And Unmounting It With Smbumount?

Jul 29, 2010

I have a server with Ubuntu 8.04.4 LTS completely patched up to date.I tried to mount a windows share using smbmount and unmounting it with smbumount. I did it as a non root user (let's say "someuser") and managed to mount the share without problems with "smbmount \\server\share xxx" where "xxx" was a directory on the user's root. After it I could see the shared files in the xxx directory, as it was supposed to be...

The problems came when trying to unmount it. Using "smbumount \\server\share xxx" didn't work giving "This utility only unmounts cifs filesystems." error message. Then I tried "smbumount xxx" and worked. I couldn't see the files in xxx directory anymore, and I could even delete xxx directory.

But now, when looking at /etc/mtab file, I still can see the share listed as mounted! The line is: "//server/share /home/someuser/xxx cifs rw,mand,nosuid,nodev,user=someuser 0 0". Also, df command lists the share as mounted too. But, as I said, the share is not really mounted, and I can even delete xxx directory without any problem... /proc/mounts doesn't list the share as mounted either... And, obviously, fstab file has no entry for this mount.

Moreover, /etc/mtab file group changed from root to someuser!I don't really understand what happened, but I assume some bug with smbumount or smbmount. Anyway, what does really worry me is how to fix this mess... I already changed mtab file group back to root, but I don't know how to return the mtab file to a consistent state.My main question is: can I simply edit mtab file and remove the inconsistent line?? I know one should never have to manually edit this file, but can it really be done in a situation like the one I'm describing? What could happen if I do it?

Also, I'm worried about if I don't do something to fix the inconsistency I could have problems when trying to shutdown the computer, or in any other situation. So, should it be safe to leave things unfixed and let everything return to normality when the system is rebooted?

View 4 Replies View Related

Red Hat / Fedora :: Fedora Shell Scripting \ "Find In Curent Folder For Files, And It Copy First File He Find With Name Gived By User?

May 18, 2011

shell scripting in Fedora14I want a script"Find in curent folder for files, and it copy first file he find with name gived by user, if name already exist then echo error message and finish"command usage " bash scriptname copyASname"

smthing like Code: #!/bin/bash
for files in /home/user/*
do

[code]....

View 1 Replies View Related

Ubuntu :: Find No Way To Copy A Cd To ISO In 11.04, Either GUI Or CLI?

Jun 4, 2011

I can find no way to copy a cd to ISO in 11.04, either GUI or CLI. Brasero does not have .iso option though the brasero-cdrkit is installed and is latest version. Evidently the /dev/cdrom is no longer used? I'm not sure what's going on there but anytime I try to use dd or cat I get and Input/Output error.

View 9 Replies View Related

General :: Find And Copy In The Same Directory

Sep 1, 2010

I installed a new music application. It reads covers.jpg as the cover of the album, however, my covers files where named album. I dont want to rename, I want to make a copy of album.jpg and if possible as well rename it to covers.jpg. The file has to be in the same folder that it currently is. I have looked around to see how I can do this but have not been able to.

View 14 Replies View Related

Ubuntu :: Bulk Find & Copy In Terminal?

Mar 29, 2010

I have found KRename to be very useful for bulk find and renames; however, I'd like to do a find a copy, which KRename doesn't appear to do.

For example, I'd like to (case insensitively) search all subdirectories for files called "cover.jpg", "cover.gif", or "cover.png" and create a copy of these called "thumb.xxx", in the same subdirectory the original is found, with the same extension as the original.

View 4 Replies View Related

General :: Find And Copy Command Comdined Together?

Feb 25, 2010

I want to find files of a particular tyepe and particular date to be copied into a seperate folder.How do i do achieve this in a single line using the find and copy command.

View 8 Replies View Related

CentOS 5 :: Find And Rsync For Remote Copy?

Jan 14, 2011

This command would copy the files to the local directory,find /mnt/nas -type f -ctime 1 -iname '*.avi' -exec rsync -av {} /mnt/Mythbuntu

View 1 Replies View Related

General :: How To Use Find To Copy All Found Files To A New Name In Their Same Directories

Feb 23, 2010

I've got a simple command that does almost what I want.

The following will locate all files with a suffix of '_compressed.swf' and copy each into its same directory with a '.bak2' appended:

However, I need to replace '_compressed.swf' with '_content.swf' I'd like to use find, rather than recursive flag on cp for consistency.

Objective
In: /content/somefile_compressed.swf
Out: /content/somefile_content.swf

View 3 Replies View Related

General :: Find Document Files And Copy Them To Another Directory?

Nov 7, 2010

This is a bit of a basic question but I'm trying to copy all .doc files I find in a directory and copy them to another directory.I know each command:

find -name '*.doc' .

and:

cp filename location

how can I combine the two commands?

View 3 Replies View Related

Debian :: Find And Copy Same Files To Single Directory?

Feb 17, 2011

I have a number of crash.log files scattered about my system and I would like to run a command to find all the crash.log files on the system and copy them to a single directory; each with a unique filename. For example, copy crash.log from ~/directory_1 , ~/directory_2 , ~/directory_3 and so on to ~/crash_logs/crash.log1 , ~/crash_logs/crash.log2 , ~/crash_logs/crash.log3 etc.

View 1 Replies View Related

General :: Script To Find New Files And Copy Them Into Different Directories?

Oct 29, 2010

I have a question which has been in part answered many times but nothing I found relateds completely to my situation. I am sure there will be people who will say RTFM but believe me I did, and searched as well but to no avail. I have a situation where I want to copy files created withing last hour in one directory into another one. The problem is that that the directories are on different levels in the dir tree so the absolute path is different. But I want to keep the relative path the same.

I want to copy new files from /mnt/path_to_webdav/user to /home/user. so if there is new file /mnt/path_to_webdav/user/doc/xy.txt I want it to be copied to /home/user/doc/xy.txt. Also if there is a new dir, say /mnt/path_to_webdav/user/newdir I want a new dir to be created in /home/user/newdir with all the files in it, should there be any. I can do find with exec and copy all the files into one directory.This is not what I want though. How do I preserve the relative path and get the files copied into their corresponding directories?

View 1 Replies View Related

Programming :: Copy An Entire Line And Add That Copy At The End Of The Same Line?

Feb 6, 2011

how do you copy an entire line and add that copy at the end of the same line?

For example, sometimes I rename a collection of files with a command like:

"mv oldfilename newfilename;"

I am able to add "mv" at the beginning, the semicolon at the end and sometimes replace a word in the middle, but... how to change a line "oldfilename" into "oldfilename oldfilename"... that is already long time a mystery to me...

View 5 Replies View Related

Programming :: Unable To Find Description Of Alsa's Programming Language

Dec 19, 2008

I am unable to find a description of alsa's programing language, this sort of stuff:

[Code]...

I need to know what, for example, 'ttable' means and what is its syntax. This seems to be a state secret.

View 2 Replies View Related

Programming :: Sed Just Can't Get It To Copy Between Expressions

Apr 22, 2010

im trying to get sed to read through a txt document that contains html and cant get it to copy over my code looks like Code: sed -n '/[width=468 height=60 border=0 /></a></center><hr>]/,/[<br clear=left><hr>]/p' 1.txt > 2.txt This is the code that seemed to have the best chance of working but still all it does is copy the whole txt document over instead of between these 2 expressions

View 3 Replies View Related

Programming :: Copy Big Files Using Tar?

Sep 13, 2010

I am trying to copy content of single folder to multiple destination simultaneously using tar and FIFO. here is the source code

mkfifo bin1.fifo
tar -C bin -cf - . | tee bin1.fifo | tar -C bin2 -xf - &
tar -C bin1 -xf bin1.fifo

[code]....

View 1 Replies View Related

Programming :: Optimizing Of Copy Constructor In C++

Aug 20, 2010

In one of my interview, interviewer asked the following question on deep copy constructor:

When we are externally overloading the copy constructor is there any optimization strategies when we are using several copy constructors.

View 2 Replies View Related

Programming :: Copy Text Between Workspaces?

Aug 27, 2010

I need to copy text from screen of one workspace to a file in another of a different user.My x-windows is a tad rusty but a quick review leads me to believe this can be done.

View 8 Replies View Related

Programming :: Why Does Installer Copy *.h Into /usr/include

Sep 15, 2010

I am working on a Linux embedded C++ project. When I do an install, all of the header files are copied into the target at /usr/include/.My question is, why would the target ever need the C++ header files? It seems to me all the target needs is the executables and the library *.so files.I want to remove the installation of header files into the target but I'm afraid I'm missing something.

View 3 Replies View Related

Programming :: Copy The Article From Wiki Using Php?

Feb 1, 2011

I just want to copy the content from Wikipedia. Daily i want to do it. But this should be done automatically. can anyone tel me how to do this in php? is there any function to copy the content of any article?

View 1 Replies View Related

Programming :: Copy At Terminal With Progress Bar

Mar 9, 2009

After searching I cant find script that can deal with directories. All the found scripts work file to file and not directory to directory. Someone know script that can deal with all this situation?

View 8 Replies View Related

Programming :: How To Copy Array In Bash

May 13, 2010

I have this code:

Code:
original_content=${content[@]};
echo ${#content[@]} # is 23
echo ${#original_content[@]} # is 1

I'd expect original_content should be copy of content. How to copy array?

View 2 Replies View Related

Programming :: Copy Article From Wiki Using Php?

Feb 1, 2011

I just want to copy the content from Wikipedia. Daily i want to do it. But this should be done automatically. can anyone tel me how to do this in php? is there any function to copy the content of any article?

View 3 Replies View Related

Programming :: Python: Won't Copy To The Clipboard?

Aug 28, 2010

I having a hard time figuring out why this code works in an interactive ipython shell, but it gives a blank clipboard when run in a bash terminal.

Code:
#! /usr/bin/python2.6
#

[code]...

View 1 Replies View Related

Programming :: Copy Files To Dynamic Directories?

Feb 14, 2011

I have been searching for a solution to the following problem:

When my distro of choice updates Firefox web browser, the directory name is '/usr/lib/firefox-<version>'.
The problem here is that the directory name is dynamic by nature and doesn't allow a simple static solution, e.g.
'cp -rf /usr/local/files/bookmarks.html /usr/lib/firefox/defaults/profile'.

The same quandary applies when adding extensions, changing prefs etc.
I have looked at the following commands:-
find, sed, xargs, grep, awk, fprint.
Unfortunately my grasp of syntax and programming is very simple at best.

View 2 Replies View Related

Programming :: Bash Script To Copy Files?

Jul 13, 2011

I have a lot of filenames (strings) following the same convention

m02_+1+7_London_0000$01.cfg
m02_+1+8_London_0000$01.cfg
m02_+1+8_London_0000$01.cfg

[code].....

What I want to do is to create a script that will interpret the following string and save into variables part of its name

m02_+1+7_London_0000$01.cfg as
------X-Y--City---------
X=1
Y=7
City=London

[code]....

then I want to copy the files that go all the files with the same City and X and Y to the same subfolder City/MX.Y I will need some help start doing that. And I think the first would be to get part of the filenames strings into variables.

View 3 Replies View Related

Programming :: Bash Script To Copy Without Overwriting?

Oct 21, 2010

i have one questions :"bash copy filename destin_dir"1- i need a bash script to copy file from one directory to another , and if the destination directory have the same file name, add '_1' to the file name ..and if there is a file with 'filename_1' , add '_2' to the file name and become 'filename_2' and so on

View 5 Replies View Related







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