General :: Can't Rename/move Files From OSX That Were Copied From NTFS
Jun 29, 2010
I recently had data recovered and it was sent back to me on what I think is an NTFS drive. I copied all the files over to a file share I have on a Linux box, that's ext4. Now I have that share mounted on my OSX machine, and I can't move or rename most of the files. However, in a couple cases I was able to rename a folder after the third try. Another time I was able to rename a folder once, but not again. All the permissions are showing up the same on the command-line -- I can't see any differences between the permissions on any of the files/folders. Note that I can create new folders and add files no problem, and then rename and move those all I want.
I'm using a dual boot system with kubuntu 10.10 and windows vista.When I try to copy files from kubuntu to a windows drive, I see no problem.But when I retsart to windows usually I can't see my files. Once or twice I have seen files I copied in kubuntu. The strange thing is that when I go to kubuntu again, I don't see files I have copied in windows drive.
How would I rename all files with a leading decimal point recursivley? I some how got all my music files to have a decimal point.I tried the below and got a " sed argument to long".[CODE]find /media/MUSIC -type f -name "*.wma" | xargs -0 sed -i 's/.(.*)/1/'[CODE]
Another question, can i just use -type f with out -name ? I am sure that all the files got the decimal point added as the first character.
I want to search a directory recursively looking for new .rar/ .zip files. When a new file is found I want to extract the contents to another directory. To top things off would like to rename the source file as something like original.rar.extracted.
10.10 on a ext4 partition. I deleted a folder that sat on a NTFS partition that I use as data storage. I note that if I delete folders or files on this NTFS partition there is not the option to move to waste basket - it is just deleted. If the folder still exists on the hard drive (has not been over written) I may be able to retrieve it - but where could it be? On the NTFS partition?
If I execute the following command: cp -R /myfiles /mydestination
If myfiles contains several sub-directories and files, in what order will they be copied? For example, directories might be named 0123a, 9993c, myfolder, xfolder.
They are not copied in alphabetical order OR in date order OR in the order they appear when using a standard ls command as far as I can tell, so what actually does determine the order?
Edit: I am trying to determine the order that the cp command uses in order to determine how far along my copy command made it before it stopped. For example, I was hoping to be able to determine it copied 3 of the 4 directories successfully.
I have ran into a permissions problem. It seems that any file I have created with Fedora I can browse to in Firefox. I cannot browse to files that I have downloaded from the internet or copied locally across our network. I changed file permissions to 755 and 777 for these files. I even thought that maybe it was the php file content that was causing the issue. So, I copied the file content from file 2 into file 1. File 1 was the file I could always browse to since I created it in Fedora. I could still browse to file 1 after it had file 2's content.
I look at the permissions and they appear the same for both files. I am not sure why I cannot open the other files. I downloaded phpMyAdmin. I cannot hit any of these files in a browser. I also copied some files from a a backup location we have internally. I cannot browse to any of these files either. I used chmod 777 filename. Even after doing that I could not hit any of the files. I moved the files into my document root directory ( /var/www/html ) and I still cannot browse to these files.
I have two systems running on linux. system one is running with RHEL 5.4/X86_64 hardware, system two is running with RHEL 5.3/i686 hardware. One filesystem is shared from system two and mounted as NFS on system one. Now when i do a copy from local filesystem to the NFS share from system one,it shows as follows
-rw-r--r-- 1 xkinved rbak1 30 Mar 3 2011 king
But if i do copy with -p option then it shows right time stamp. Both machines are running with slight(minutes) different in time. Does this could be cause for this problem? The problem is happening while i do FTP from some other machines too.
I have iomega appliance, which is based on Debian distribution. There is an NFS share that I have created which is without password. Since it is without password, there are some viruses copied. I want to find out which IP address is the source of these files. In other words, I want to know which PC is copying these infected files on the NFS share
How to set the default file permissions on ALL newly created files in linux - but differs in important ways:
I want all files created in (or copied to or moved to) a certain directory to inherit a set of default permissions that is different from the system default.
Rationale: The directory in question is the "intake hopper" for an application. Users in a group place files in the directory, and the app (running under another user id in the same group) takes them and processes them. The problem is that the owner of each file placed in the directory is the user that placed it there, and the permissions are defaulting to "rw-r--r--"; I want to change that to "rw-rw----". The app doing the intake can't do that explicitly, because the user id the app is running under doesn't own the file in question, and the default permissions don't allow the app to chmod on the file! Obviously, the user could do a chmod after putting the file there - but I want to keep the "drop" by the user as simple as possible. (These folks are not linux-literate, they just drag and drop the files from their windows desktop to a (Samba) network share - i.e. they don't even know they are interacting with a linux system.)
umask seems too powerful: I don't want to set default permissions for every file created anywhere by these users - just those created in (or placed in) this directory.
There was a Toshiba Satellite notebook with XP I decided to install Fedora 13 in dual boot mode.So, I booted with Gparted and shrunk the ndows XP partition to just 24 GB.Then I set up partitions for Linux this way/boot, ext4 256 MB/, ext4 16 GB/home, ntfs 176 GBswap, 8 GBI intentionally left about 8 GB left just in caseThen I proceeded to install Fedora 13.I used the customized mode to use the already set up partitions and keep Windows XP.At the moment of setting the mounting points, fine with /boot, / and swap. But Anaconda wouldn't accept mounting point for /home.I went on anyway.Fedora got set up and run moothly.However, /home resided in / with only 10 GB left.And the /home partition could be seen as a separate disk with its 176 GB.This is /etc/fstab:
# # /etc/fstab # Created by anaconda on Sun Sep 5 05:46:26 2010
I have a directory which was downloaded and has a silly name like "-=Directory=-" on my headless (no GUI) linux box and when I try to deal with this directory using "mv" in order to rename it or move it somewhere, it simply does not work. Terminal instead says:
I feel like this should have come up before, but is there a convenient way of moving something [directory is what I care about] while leaving a symbolic link in its place? Currently the best way I can find is:
Terminal: -script of 'mv "$1" "$2"; ln -s "$2" "$1"' -requires typing out the target name, since it tab completion doesn't work on non-existent things. GUI: -move -rename [copy content first] -link back -rename link [paste previous content]
The terminal way defeats the point of using the GUI to easily drag and drop things around, and the GUI is rather clumsy when I have to use copy and paste to even make it work. Being able to manually edit a link target would simplify it, but I don't know of a way to do that.
Note that I'm pretty sure I don't want a terminal solution here, because it's stuff which I don't want to type (and sometimes can't.. seriously, I don't want to try to type a star). Example:
#source: foo/Some Long thing that has ~random~ characters[a#$%] (%^^) that are annoying!/ #target: bar/Something Short/
I've been trying to figure out how to move /home to the other partition that exists on my computer, however it's ntfs and turns out it's impossible to move my /home there. So how do convert that ntfs partition to ext3, I don't mind loosing data that's in that partition. [url] is the partition I'm talking about. So what's the best way to do it ? If you write what commands I should use please include partition names.
I am hoping someone already has a script or knows of an app that will let me do this fairly easily - I have a fairly large folder structure that goes several levels deep, etc. In many cases there are duplicate file names that are not really different, e.g., /home/chris/folder/folder1/doc1.doc /home/chris/folder/folder2/folder3/doc1.doc
I want to recursively go through /home/chris/folder and move everything to /home/chris/another_location/ without subfolders and renaming duplicates as appropriate, e.g., /home/chris/another_location/doc1.doc /home/chris/another_location/doc1_1.doc
Just built myself an HTPC from scratch and installed Ubuntu 10.10 on it (using XBMC for now). I'm familiar with Linux and have been dabbling with it for many years but in the end my main computer runs OS X.Trying to modify a script I found elsewhere that will auatomagically rename and move downloaded TV shows into a preexisting file hierarchal system. I have an automator function on my Mac that was put together for PLEX but it will obviously not run in Ubuntu.Here's what I've got so far. Remind you I'm not much of a programmer:
I'm planning to writing a script to rename files recursively.
To be said that I'm using /bin/sh (not /bin/bash) as this is the only shell available on the busybox of the linux router (tomato) I'm using.
Basically I would like to rename files with extension .jpg using as a suffix the filename of another file in the very same directory with extension .avi
The reason for this is because pretty much all the DLNA devices like modern TV playing .avi files will display a thumbnail of the video when browsing the filesystem, however to do so they'll need .jpg image wit hthe same filename of the video in the very same directory.
I'm currently trying to make a script to rename all the files with one provided file extension to a second provided file extension. I've achieved this by commanding "sh newext doc txt" with the following which works perfectly:
#!/bin/sh for f in *$1; do mv "$f" "`basename "$f" $1`$2"; done;
However, I'd like to be able to modify what I've written so far, so that I can choose whether to convert file extensions in a subdirectory or not. For example, I could enter "sh newext -r doc txt" and the subdirectory's files would also be affected by my script, or enter "sh newext -n doc txt" which would only affect the directory I'm in.
I have to do a very simple task but being a newbie, its becoming a challenge Here is what I have to do:1. I have a bunch of *.html files most of them are duplicates: file1.html, file6.html and file12.html could be duplicates.2. I have to eliminates the duplicates by using the cksum and rename the files by using the sumô value (sum.html)Something like:
I get a bit lazy using cUrl, often letting downloads go without adding the proper extension to images and whatnot. Yes I know about the -O flag, but I'm the kind who likes to give my files unique names right off the bat (until they puzzle out a way to "stamp" files with originating URLs across platforms, Classic MacOS Web-browser style, curl -o is the way to go). So I was hoping someone could help me write a script (bash or python, doesn't matter which) that used the file command to look inside files in a single directory and then rename the ones it happened across that didn't have a 3- or 4-letter extension, appending the one that corresponded with the mime type. But this action only to be performed on files with no extension.
I know Linux and Unix don't bother much with extensions. I started home computing on a Mac IIcx -- that kind of intuition is beyond natural for me and very much appreciated. But I, and a few of my friends and family, alsose Windows where file extensions are an idiot-proof way, if nothing else good can be said about the two, to get file X to open in application Y and not Q, W or Z (or, worse for some, no application at all).I've seen a few scripts in different places, but they all seem to have the flaw of renaming files that already have an extension
I have files whose names look like this:Sim1-2_40.36.chr20_sb.foo.indel.novoalign.samSim1-2_40.36.chr20_sb.foo.indel.bwa.samWhat I want to do is to replace all indel with snp in the namesyieldingSim1-2_40.36.chr20_sb.foo.snp.novoalign.samSim1-2_40.36.chr20_sb.foo.snp.bwa.samBut why this unix command doesn't work
I need a either a script or perl script that will allow me to mass rename files, folders, and sub folders. I need to replace special chars in the current file names with underscores. I was able to make this happen in a single directory, but not recursively.
Here is what does it in a single directory.
for file in * do mv "$file" $(echo "$file" | sed 's/[^A-Za-z0-9_.]/_/g') done
I'm trying to write a script to process some images and rename them, or more specifically, renumber them so that pg_0001.png becomes pg_0.png, pg_0002.png becomes pg_1.png, etc. I've looked at the rename command and sed, but I'm not really very familiar with these. It should also be part of a bash script that I've written for the processing of these files - this is what I have so far:
Fox example.I want to rename the files below like this: test1.png„ÄĀtest2.png.....
-rw-rw-r--. 1 test test 20448 2010-12-08 20:11 2010-12-08-212440_1440x900_scrot.png -rw-rw-r--. 1 test test 29799 2010-12-08 21:25 2010-12-08-212526_369x331_scrot.png -rw-rw-r--. 1 test test 34167 2010-12-08 23:54 2010-12-08-235424_580x328_scrot.png -rw-rw-r--. 1 test test 155202 2010-12-08 23:55 2010-12-08-235511_1440x900_scrot.png