General :: Remove Files In All Directories Owned?

Jan 8, 2010

Is there a way to do the rm command where I can remove files by owner. I run the standard ls -al command and I want to be able to remove the files that are owned by me in that current directory. One other step how can I remove files in all directories owned by me. I did the google search first guys and a majority of the pages just dealt with the basics like rm -r

View 5 Replies


ADVERTISEMENT

General :: Remove Directories That Only Contain .txt And .log Files?

Aug 8, 2010

I'd like to remove all directories of a certain depth that don't contain .txt or .log files -- is this possible? So far I have: find ~ -mindepth 3 -maxdepth 4 -type d -exec rm -r '{}' ; Is it possible to add in "only if the directory doesn't contain .txt and/or .log files"? Or do I have to start learning perl to do that?

For example:
dir 1:
hello.txt
runme.sh
dir 2:
runme.sh
oct12.log
[Code]....

View 13 Replies View Related

General :: NTFS Mounts But Can't Remove Files/directories?

Feb 9, 2011

this is my first post and I am not sure if this belongs here or in hardware.Now for the main post!

setup:
Dell Demension 4400
Intel(R) Pentium(R) 4 CPU 1.60GHz, 1 cores

[code]...

View 4 Replies View Related

Ubuntu :: Creating Directories Owned By Specified User

Jul 15, 2010

I have just installed an SSD as a secondary hard drive and formatted as ext4. (the Ubuntu installation is on a different drive)how I would go about creating a directory on the SSD that is owned by the user 'Test user'.

View 8 Replies View Related

Ubuntu Installation :: Creating Directories Owned By A Specified User On SSD?

Jul 15, 2010

I have just installed an SSD as a secondary hard drive and formatted as ext4. (the Ubuntu installation is on a different drive) Im very new to linux, Could someone inform me how I would go about creating a directory on the SSD that is owned by the user 'Test user'

Im sorry if this is a daft question, im just moving from windows to linux and struggling a lot.

View 3 Replies View Related

General :: Can't Copy Files To Root Owned Files?

Feb 1, 2011

When i installed ubuntu. I made a seperate partition so that i could copy an ISO image onto it of an up-to-date version of ubuntu. I wanted to then boot the ISO up so i could install the version that way.I've already tried doing it through the update manager but it'll download, almost be done with installing and it freezes on me. so i figured this would be easier. However i do not know how to gain access to the other partition to copy the ISO image.

View 6 Replies View Related

General :: Create A Backup Directory And 3 Directories Within That And Some Files Within The 3 Directories And Then Back Them Up Ot Restore Them?

Dec 19, 2009

i am in need of linux help. iam at college and i need this back/restore script to pass this final part of an assessment. i require a backup script that will not only backup but also restore files to the relevent directories. e.g. users are instructed to store all wordprocessor files in a directory named wp. so i am needing to create a backup directory and 3 directories within that and some files within the 3 directories and then back them up ot restore them. l know i should/have to do this myself by been trying to get/understand info for the last few days and came up with zero.

View 14 Replies View Related

Ubuntu :: Single Command That Will Remove All 'other'permissions From All Files And Directories Under /home?

Sep 10, 2010

What is the single command that will remove all 'other'permissions from all files and directories under /home.
Just starting to learn Linux.

View 1 Replies View Related

General :: Set A Directory So That All Files Created Below It Are Owned By Dir Owner?

Jun 8, 2011

I have a directory cookie_tmp which is owned by some:fella. Session cookies are being created under this directory as How can I set the directory so that files are created and owned by some:fella ?

View 2 Replies View Related

General :: Find Root Owned World Writable Files?

Oct 11, 2010

Being a system administrator i came across a statement as "Excluding temporary directories /tmp and /var/tmp, no root owned files should be in world writable directories"While the above statement may look straight forward but how would i check if there are any such directories in the distribution?

View 14 Replies View Related

General :: How To Store Files / Directories In Different Different Directories?

Mar 23, 2011

I am writing a script, in that my requirement is, if all the fill types stored in one directory from that we need to separate different different directories based on the file types.

for example in a directory(anish). 5 different types files
1- directory
2- .txt files
2- .sh files

like that and my requirement is the (1- directory is moved to one new directory(dir) which we are given in the script)and (2 .txt files are moved to another new directory(test) which we are given in the script)and ( 2 .sh files are moved to another new directory(bash) which we are given in the scrip)finally the directory anish should be empty..using bash script.how it is possible !!

View 7 Replies View Related

General :: Remove Multiple Directories In Different Locations?

Mar 15, 2010

I have hundreds of directories in various subdirs that I need to remove. I want to remove all of these dirs, but can only find solutions on how to do remove files (or how to remove subdirs from within the current dir).

I think I need something like

find -iname 'testfile*' | xargs rm -i

where I want to remove every directory that contains the word 'testfile' within the directory name. I know xargs wont work for dirs,

View 9 Replies View Related

General :: Creating A Script To Move Or Copy Files Into Multiple Directories Below The Files?

Aug 25, 2009

How can you create a script to move or copy files from a main directory into multiple directories below the main directory.

View 7 Replies View Related

General :: Files Created In A Directory Owned By Directory Group?

Jan 29, 2010

Is there a way, on Linux, to cause all new files created in a directory to be owned by the directory's group instead of the creating user's group?

View 2 Replies View Related

General :: Recursively Cp All Directories, Files And Hidden Files?

May 17, 2010

Ubuntu 10.04

I want to copy all directories, files, and hidden files and hidden directories with one command. I want these items to replace any same items in the target directory.

I have tried several things, such as:

cp -r *
cp -aR *

but I only seem to get visible files and directories. Obviously, I am missing something. (A brain, probably....)

View 9 Replies View Related

Ubuntu :: Getting A List Of Files Not Owned By Any Package?

Feb 7, 2011

I'm pretty sure that I have some unneeded files laying around on my system. Most of them are created with "make install" command.

To remove them, I need to get list of files which are not owned by any package. How can I do that?

There is a way in Arch Linux: [URL]

View 3 Replies View Related

Red Hat / Fedora :: Recover Root Owned Usb Files?

Jul 7, 2011

I have a usb drive that is owned by root with chmod set to -w-r-x for all othersthe system that root existed on crashed and now i'm trying toecover the files on my usbi have the root password and uuid of crashed hdd can i use a program or copy uuid to new system to recover usb?

View 1 Replies View Related

Ubuntu :: Mount FAT32 Partition Without Being The Files Owned By Root?

Jan 27, 2010

I want to mount my FAT32 partition automatically on startup. It gets mounted but the problem is that all the files in the FAT32 partition are shown as owned by root. Because of that I can't paste files or write to this partition. This is my fstab file

Code:
# /etc/fstab: static file system information.
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda5 during installation

[Code]....

View 4 Replies View Related

Ubuntu Installation :: Files Owned By User 1000 - No Access

May 25, 2010

Running 9.10 now, I'd like to do a clean install of 10.04 on my dual-boot (with XP) Compaq notebook. As a test, I burned an ISO image onto a 1-GB stick and booted to 10.04 from it. It works just fine, except that the directories in the Documents folder on my hard drive are owned by "user 1000", and "he" grants me access to only about half of them.

Is this problem likely to persist if I actually install 10.04 rather than just running it from the stick? If so, what can I do about it? Second question: am I correct in understanding that if I still need to access my Ubuntu partition from XP, I'd better stick with ext3 for this install rather than going to ext4?

View 2 Replies View Related

Ubuntu :: When Mounting CIFS Share, App Files Are Owned By Root?

Jul 26, 2011

I'm trying to mount some CIFS shares (NetApp) to my Ubuntu 11.04 desktop (64-bit).I am mounting it as a domain user with admin rights and full control over the share.ter mounting it as root, all the files are owned by root and I can't modify them from my non-root user.Here is how I am mounting the share:

mount -t cifs -o domain=example,username=example-user,password=mypassword //myfiler.example.com/myshare$/mydir /mnt/myshare/

This share is a qtree under a volume with security type set to NTFS. (Although I have also tried security type = Mixed) We don't configure user-level access to shares on the filer, we create directories and lay down permissions on those from the Windows side. (Although I have tried explicitly adding my domain user to the access list for the share)

View 5 Replies View Related

Programming :: Shell Script That Deletes All Files Owned By A User?

Jan 14, 2010

the script should take as input in the begginig the username of the user and then deletes all the files and folders from the user in every place he has them. script must also check if the parameters have been given correctly (only one and that one must be a username) Doesnt all the files of a user exist on a folder with his name? what if i delete this folder? Will something like this work?

Quote:

E_NOARGS=65
if [ -z "$1" ] # Exit if no argument given.
then
echo "Usage: `basename $0` directory-to-copy-to"

[code].....

View 7 Replies View Related

Server :: NFS Export Giving A Computer Access To Root-owned Files?

Oct 8, 2009

Yes, I know this is not a good practice, and this is only a short-term solution.I have a server with a web-file-server daemon running internally as root, so the permissions for all files it transfers/creates have a uid/gid of 0:0.This is fine for the daemon, but I would like to manage those files from another workstation - actually a few workstations on a very limited LAN subnet - through NFS. How would it be possible to have users from a certain subnet mount NFS with root read/write abilities?I have seen the anonuid/anongid options (for the /etc/exports file), but I'm not so sure this is the right way to go.

View 5 Replies View Related

General :: Merging Two Files From Two Different Directories?

May 14, 2011

I'm totally new to Linux and this website. I was wondering if anyone had or could help me create a shell script that would merge two files from two different directories and then have that new merged file in a third differnt directory.The merged file would need to eliminate duplicates and sort the contents.

View 6 Replies View Related

General :: What Kinds Of Files Are Stored In The Directories

Mar 12, 2010

3.State what kinds of files are stored in the following directories. Give any ONE file that can be found in these directories.

a. /etc/
b. /proc/
c. /sbin/

View 2 Replies View Related

General :: In What Order Are Files And Directories Copied When Using Cp -R?

Jun 26, 2011

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.

View 1 Replies View Related

General :: Removing Files Or Directories Recursively

Jan 29, 2010

The rm command man pages discusses removing files or directories recursively. So what is meant by deleting a file or directory recursively? And what are some reasons for doing so?

View 3 Replies View Related

General :: Viewing Backup Files But Only In Some Directories?

Oct 26, 2010

I backed up my Laptop with a script, as follows:

Code:

#! /bin/bash
sudo
growisofs -Z /dev/dvd -dvd-compat -r -v /home

I then installed a new version of Ubuntu 10.04 from disk and copied the files in /home from the cd to the hard. I am able to open, view etc. all the files in most directories except those in /home/documents. There are text files created by gedit, OOWP and several PDF files. I cannot open or view these files, depending: gedit and pdf files gets a Err.Msg. "Don't recognize file type" (it is clearly marked PDF) . The OO files look like rows of 'high bits' and a dialogue box opens giving me the options to change Char. Set, Font, Language, Paragraph break.

View 6 Replies View Related

General :: Copying Doc Files From Multiple Directories To One?

Feb 1, 2010

I have 60+ directory's each containing multiple .doc files. I need to move them to a single directory and keep their file name intact. I don't think cp will do that with out listing all the file names. I was thinking of something like: cp -r /dir/*.doc /newdir . Or should I use a combo like find -type *.doc|cp /newdir?

View 5 Replies View Related

General :: Make A List Of Directories And Files?

Jun 3, 2011

My system is centos 5.5, and I need nobody:nobody's directories and files under data.

There is a directory named "data, and this directory has so many directories and files generated by web program. Most of them is nobody:nobody.

I want to to make a list of these nobody:nobody directories ans files.

Is it possible to make a list of these directories and files?

View 1 Replies View Related

General :: System Call To Know Files And Directories In PWD

Mar 3, 2010

I am searching for any system call similar to "ls" command we use in shell. My requirement is knowing the files and directories in curent working directory and process them based on there type. Here as of now I spawn another procees with system command like system
("sh ls -l | grep ^d | awk '{print $9}'").

Instead of this I want to use any system command where I can capture this information directly into my local character buffer. My opinion is that system calls will not spawn another process as a result less time it takes, another reason is once I use the system command again I need to capture the information to a local file then again read it into local buffer. I want to avoid the file manipulation here.

View 1 Replies View Related







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