General :: Renaming File Right Access?

Apr 13, 2011

the permission of 'renaming a file' is included in which right: 'read', 'write' or 'execute'

View 1 Replies


ADVERTISEMENT

General :: Renaming A File Other Than Using Mv?

May 28, 2011

I was wondering is there another way of renaming a file aside from using mv in linux?

For example changing /home/usr/blah.txt to something like -home-usr-blah.txt

View 4 Replies View Related

General :: Renaming File Permission Chmod?

Apr 11, 2011

that works to disallow non-owners from renaming the file, but what I wouldlike to do is disallow EVERYONE ( including the owner of the file ) fromediting, moving, or changing the filename once it is created. the only personwho should be able to make those changes is a special user.

View 13 Replies View Related

General :: Specific File Name Renaming In All Sub Directories?

Apr 4, 2011

I have a dir (pub_html) with 45 sub dirsand in each there is a file with name file123.html) what command can I use to rename all files with this name in all sub dirs to file456.html ? I'm on opensuse 11.3

View 14 Replies View Related

General :: Copy A File X Times Renaming It With All Alphabet Letter?

Sep 11, 2011

this seems to be a strange question, i know. I've a database sqlite file called "a.db".I need to copy it 20 times (1 time for each letter of the alphabet) to have : b.db, c.db , d.db.

View 1 Replies View Related

General :: Renaming Files With Sed - Mv: Missing Destination File Operand After `$i'

Mar 20, 2011

Today i am trying to learn how to use sed. I set up a testing folder with the following files:

AAb.lol
AAc.lol
AAx.lol
test.sh

My goal is to create a script (test.sh) which renames all the files to their original name without AA. I want to end up with this:

b.lol
c.lol
x.lol
test.sh

sed seemed to be the perfect tool so i went ahead and created a script which i think should clear the job.

[Code].........

mv: missing destination file operand after `$i' From that 2nd line i can tell that $NewName is just empty. I also read something about sed needing the -e option for scripting purposes but i just don't understand it.

View 7 Replies View Related

Ubuntu :: Renaming The Smb.conf File?

Apr 5, 2011

I am trying to follow the instructions in the smb.conf file which says, "name original file smb.conf.master and create the "real" config file with test parm -s smb.conf.master >smb.conf".

First I made myself the owner of the smb.conf file. Then I tried to rename the smb.conf file to smb.conf.master. When I try to do this with: rename smb.conf smb.conf.master the result is: Bareword "smb" not allowed while "strict subs" in use at (eval 1) line 1.Bareword "conf" not allowed while "strict subs" in use at (eval 1) line 1.

Can someone tell me what this means, (why it is happening) and what do I need to do in order to rename the smb.conf file to smb.conf.master.

View 6 Replies View Related

Ubuntu :: Deleting File While Renaming / Recover These?

Feb 25, 2011

This has happened twice to me. I'm editing a filename on the desktop, for example, I have a part of the name highlighted and press delete. Inadvertently, I press delete again, but with nothing highlighted. The file is deleted, but is not added to the recycle bin (possible bug).

I believe that is what is happening. I cannot seem to recreate it purposefully on my work computer --I had done this at home this morning while sans-coffee.

Is there a way to recover the files?

View 1 Replies View Related

Programming :: File Renaming Based On A Pattern Match

Jan 8, 2011

What I am attempting to do is rename some television shows into the format that my PVR will understand for the naming convention. I have a script that cleans them up about 95%, now I just cant figure out the last little detail..

For example: NCIS_01.mkv
I think it can be done in sed, but I just figure out how. I need it to be renamed to: NCIS_s01e01.mkv

How can I make sed (or something else) match the last "_" and any numbers after it until the period and then insert text between them reliably?

Depending on the show, it can be something like: This_show_name_243.avi so I need it to be more flexible than I can figure out how to do..

View 6 Replies View Related

Ubuntu :: Renaming All Files In Directory But Leave The File Extension Alone?

May 22, 2010

how can I rename all files in a directory up to the first dot (there by leaving the file extension alone) to the same thing? Im trying to rename all my media files and associated files in a directory to (preferably) the name of the directory it self. if I have

Code:

A Clockwork Orange -
wzzyfg.cd1.avi
wzzyfg.cd2.avi
wzzyfg.nfo
ACO.fanart.jpg
orange.tbn

Id like to automatically mass rename them all to

Code:

A Clockwork Orange
A Clockwork Orange.cd1.avi
A Clockwork Orange.cd2.avi
A Clockwork Orange.nfo
A Clockwork Orange.fanart.jpg
A Clockwork Orange.tbn

I have rename on my server which I used to remove underscores from file names, but I dont know how I would use it to rename everything up to the first period. Bonus points for renaming stuff to the name of the parent folder!

View 5 Replies View Related

General :: Unable To Access File /home/username/.iceauthority: No Such File Or Directory

Apr 21, 2011

Can't log into my XFCE desktop like I normaly do. all the sudden I get notified that my xsession lasted less then 10 secondsLooking at the error I can see this:

Unable to access file /home/username/.iceauthority: No such file or directory

Using failsafe I can start a terminal. From terminal I tried to start X

Code: sudo startx Result: Running on desplay:0

So I tried to run this;

Code: sudo startxfce4 And I get up a graphical desktop.

So this is not a critical situation as I easily can use this method to log on, but as there has been something causing this I would like to be able to resolve this nonetheless. Btw it is not the old chmod trick in play here, cause my .iceauthority file is gone alltogheter.

View 6 Replies View Related

General :: Renaming A Fat16 Volume?

Dec 18, 2010

What's the easiest way to rename (change the volume label of) a fat16 volume (e.g. on a USB drive) from linux? It seems like mlabel from the mtools package is meant to do this, but the documentation is not geared to rapid assimilation.

View 1 Replies View Related

General :: What's The Command For Renaming Files

Jun 8, 2010

What's the command for renaming files? I thought it was "mv"--I typed "info" and read

Quote:

* mv: (coreutils)mv invocation. Rename files. So, desiring to give a .JPG extension to a jpeg file that had no extension (because I dug it out of my Firefox cache), I typed

Quote:

mv '/home/josh/Desktop/Natalie pictures/DEC8FFA5d01' *.jpg

That didn't rename the file; it made the file disappear from its folder. What did I do wrong?

View 6 Replies View Related

General :: Renaming Variables In A List

Mar 14, 2011

I am trying to rename a list of variables in my script using a second list of variables. I want the variables in the second list to replace the variables in the first list such that the first variable in List 1 is renamed after the first variable in List 2, the second variable in List 1 is renamed after the second variable in List 2, the third variable in List 1 is renamed after the third variable in List 2, and so on.

For example:

I know how to rename each file individually, but would like to run Do Loop which can rename all my output files at once.

View 7 Replies View Related

General :: Batch Renaming Of Files In A Directory Using Sed

Dec 11, 2010

I run a script which generated about 10k files in a directory. I just discovered that there is a bug in the script which causes some filenames to have a carriage return (presumably a '' character).

I want to run a sed command to remove the carriage return from the filenames.

Anyone knows which params to pass to sed to clean up the filenames in the manner described?

I am running on Linux (Ubuntu)

The character causing the filename to 'break up' accross multiple lines appear to be a CR (carriage return) instead of ' '. The filename is being diaplayed in thetitle of a text editor with %0D in the positions of where the file name breaks up. So I need to remove the CR chars from my filenames.

View 1 Replies View Related

General :: Batch Renaming Based On Wildcards?

Jul 20, 2010

Is there a way to do a batch renames of files that will keep each individual filename, but change it in the way I want?

The specific issue is this. I have a harddrive with something like 1300 movies on it. They're all organized alphabetically, but there are like 200 movies that begin with 'The'. I want to rename all of these movies that begin with The so that the The at the beginning is dropped and added at the end (for example, turn "The Shawshank Redemption" into "Shawshank Redemption, The"). I'd like to do this with a simple command if its possible.

View 2 Replies View Related

General :: Renaming MP3 Collection (Bash Script)

Dec 20, 2010

I've been trying (and trying...) to write this script. I'm a complete newbie on bash scripting. This is what I've come up so far:

Code:
./reading
| Number of characters 48
| + Current: 107_david_guetta_-_missing_you_(feat._novel).mp3
| + Changed: 107_david_guetta-missing_you_(ft._novel).mp3
| + Matched: "(feat._" substitute "(ft._"
| + Morping: "107_david_guetta-missing_you_(feat._novel).mp3" to "107_david_guetta-missing_you_(ft._novel).mp3"
'-[END] ....

View 7 Replies View Related

General :: Renaming A Flash Disk In Ubuntu?

Oct 17, 2010

its very easy to rename a flash disk or even a memory card or any storage in windows because all you have to do is right click on the disk and an option is there rename, i have failed to find a way of doing this in linux ubuntu 8.04, but i understand its possible even in the command line, i need to rename my flash disk

View 1 Replies View Related

General :: Disabling Cut And Paste - Renaming In Samba Server

Feb 4, 2010

We are having 12 windows computers xp which are connected to a linux machine which has samba server installed on it for backup purposes of these 12 windows users. We want the like this , that a user copy a folder from their local machine and paste it to the samba server . but they cannot delete this folder once the backup is there at linux machine.

So this is working fine. But our users are able to Rename the folder they have pasted at linux machine which we dont want . and even they are able to cut and paste files from 1 folder to another folder in the samba server. We just want them to copy a file or folder from their local windows machine and paste to samba server and they can also read it (copy and paste back to their windows computer)whenever they want . but we dont want them to cut and paste within linux machine and rename that file as well.

View 1 Replies View Related

General :: Code For Renaming Files With Prefix In Subfolders?

Feb 12, 2011

I want to rename files in multiple subfolders with a prefix (e.g., rename "file.tif" with "prefix_file.tif") and not have to be in the subfolder.

code: for f in /path/to/*; do echo mv "$f" "PRE_$f"; done

gives you this: mv /path/to/file1 PRE_/path/to/file1

instead I want this: mv /path/to/file1 /path/to/PRE_file1

View 3 Replies View Related

General :: Renaming Files In Batch With Unix RENAME?

Mar 6, 2011

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

View 4 Replies View Related

General :: Mint Does Not Start After Renaming Home Directory

Mar 20, 2011

I messed up the whole thing and the settings. Created some new thing named rhk which I can't remember as it got all messed up and Now I am getting nothing after Linux Mint 10(julia) boots up - no start menu, no panel, no taskbar nothing. I tried to work in the recovery mode and got some(downloaded) 216mb of something(in the repair broken packages). Moreover whenver I have booted in it shows messages like Could not update ICEauthority file /home/rk./.ICEauthority

there is a problem with the configuration server. (usr/lib/libconfig24/gconfsanitycheck2 exited with status 256) The panel encountered a problem while loading "OAFIID: NOME_mintMenu" The panel encountered a problem while loading "OAFIID: GNOME_IndicatorApplet" Naulitis could not create the following reqiured folders: /home/rk/Desktop, /home/rk/. Naulitis Moreover Alt+F2 gives Run application or run with file and nothing seems to be working.

View 2 Replies View Related

General :: Renaming Multiple Files Caused By Dropbox

Jul 20, 2011

Recently I installed Dropbox on a server to do file synchronization and it added " (Case Conflict 1)" to a whole bunch of my files! I realize now that it was caused by case insensitivity but I'm still left with hundreds of files that are in this renamed state. Is there a script in Linux that would allow me to recursively go through the directories and strip out this string?

i.e.
a (Case Conflict 1).jpg --> a.jpg
/myfolder/abc (Case Conflict 1).doc --> /myfolder/abc.doc
/myfolder/subfolder/mydoc (Case Conflict 1).pdf --> /myfolder/subfolder/mydoc.pdf

View 2 Replies View Related

General :: Copying And Renaming Multiple Files In Working Dir

Apr 8, 2010

How can I copy multiple files, each with a slightly different name from the SOURCE in the same directory?

Example: '/home/junk' contains A.txt, B.txt

I want to copy /home/junk/A.txt to /home/junk/A1.txt and /home/junk/B.txt to /home/junk/B1.txt using a single command.

View 11 Replies View Related

General :: Renaming A Bunch Of Files Using For-structure And The Mv Command?

Feb 3, 2010

Basically I need to rename a bunch of .doc files using the for-structure and the mv command (w/ wildcards) in bash. I guess this would be a bit easier if I'd use the rename command, but since this is a school assignment of sorts I need to use for & mv. The .doc files are named "1filename.doc", "2filename.doc" etc. And I've got to rename them to "aaa_1filename.doc", "aaa_2filename.doc", "aaa_3filename.doc" and so on. Tried to dabble quite a bit with the for and mv commands, basically just got a bunch of errors. Every damn time. For 2 hours. The most common error was "mv: missing destination file operand after ..."

View 6 Replies View Related

General :: Renaming Multiple Files In Batch Process

Feb 21, 2010

I have some random files in a folder. I want to rename all of the files in a batch process. I have a text file that contains the Currentname of all the files in the folder, as well as a text file with all of the Newname of files in the folder. I want to replace Currentnames with Newnames.

For example, here are the names of the files in the folder:
1.mp4
2.mp4
3.mp4

I have a text file with the Currentname of all the files in the folder:
1.mp4
2.mp4
3.mp4

I have a text file with the proper Newname of the file:
a.mp4
b.mp4
c.mp4

I want to rename Currentname with Newname in the folder. So when I go to the folder the Newname of the files are:
a.mp4
b.mp4
c.mp4

View 14 Replies View Related

General :: Renaming External Files Changing Ownership Instead Of Root

Mar 28, 2011

i have inherited a mixed bag of sorts: several xp users updating an access mdb with the BE on a lamp stack shared via samba. i have a backup device which gets mounted at: /media/disk... each client record (has) a folder by the companyname on the samba share, and all relative documents are placed there. when the backup script runs, it just copies newer or missing files.

someone has been renaming folders, and not matching the folder name to the related companyname from the mdb. so...the backup script captures and duplicates the data in the renamed folders. some client records also have periods in the name (not required from a data pov), such as 'Company Ltd.' instead of 'Company Ltd'. i can produce a list of company names as the folders should be found easily enough, but get a little stuck with the linux scripting.

i can easily remove and further prevent any unwanted punctuation in the company name on the client record, and create the correct folder name on the samba share with vba, but would also like to:

-for each 'client activity' folder on the backup device
-rename the folder by removing punctuation marks
or
-delete the folder if is a dupe

i tried: ls -al | grep '&' - it properly returns only those lines with an ampersand in the folder name, but returns all folders when i try that with a '.'.

what would be the easiest method to do the renaming? i thought if there was a way to change ownership of the mounted device, then the vba code (easy to write) would be simple.

OK - i just ran chown -R on the external device, changing ownership to (me) instead of root. didn't want to because it took too long, but can now use the MoveFolder method of the filesystemobject from my app to do the renaming instead of some sort of bash script (which i was dreading).

View 1 Replies View Related

General :: Windows Access The File From Ubuntu Got Read Only Even Though Have A Full Permission To Read, Write And Execute The File?

Feb 4, 2010

What are the possible problem when Windows access the file from Ubuntu got Read Only even though have a full permission to read, write and execute the file? Ubuntu to Ubuntu accessing the file there is no problem only Windows got a problem.

View 1 Replies View Related

General :: Can't Access The Php.ini File

Feb 28, 2010

I am having a really annoying problem. I have a VPS service, not shared. I am trying to access my php.ini file though PuTTy and the location is /usr/local/lib/php.ini I do the following command

pico /usr/local/lib/php.ini

the file seems to be empty, all that is brought up:

date.timezone="America/Denver".

I need to access it and change some settings!

View 1 Replies View Related

General :: Ls: Cannot Access *.php: No Such File Or Directory

Apr 30, 2011

Code:

count=`ls *.php -l | wc -l`
if [ "$count" -ne "0" ]; then
mv *.php ~/Desktop/PHP

[code]....

With this code I am attempting to ensure a php file exists, then attempting to move it to another folder. My script has 40 or so extensions, this is one of many. My problem is this: if the current folder contains no php files i receive an error.

ls: cannot access *.php: No such file or directory

Typically I would use 2> /dev/null to handle output suppression but in this case it prevents the variable assignments.

View 5 Replies View Related







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