General :: Exclude Dir From Find Command

Feb 5, 2011

i have this find command to find modified files and copy them.Code:find $SRC_DIR -type f -ctime -1|xargs -i cp --parents {} $BACKUP_DIR/$DAY/and it works good but it want to exclude files that exist in some folders like $SRC_DIR/cash and $SRC_DIR/woks/tmp

View 3 Replies


ADVERTISEMENT

General :: 'find' Command Regex To Exclude Hidden Files?

Jun 28, 2010

I have the following command which finds all files that have changed in the last day and lists them. How can I exclude hidden files like .bash_history?

View 3 Replies View Related

General :: Use Exclude Option In"rm" Command To Exclude Some Files/folders?

Feb 3, 2010

i have created on folder in my server to upload some regular states. I want that user can modify or upload already stored files. but, should not upload any unwanted files orfolders.for that i want to use "rm" command as auto scheduler (putting this in cron tab.so that all files will be removed except some required files / folders for which this upload facility is activated. users are using secure-shell for uploading data.

View 1 Replies View Related

General :: Exclude NFS In Find

Jan 20, 2010

I want to search files excluding the NFS find / -mount -name 'filename' restricts the search only in the root disc partition,but the file can be in other partitions also.Is there any way to exclude the NFS only...

View 7 Replies View Related

General :: Using Find To Exclude Some Files

Dec 7, 2010

I'm trying to find all java files in bash that contains the method "assign()".I would like to retrieve the same list except without the Test* files. How can I do that?

View 3 Replies View Related

General :: How To Exclude Multiple Directories In Awk With Find?

May 20, 2010

I found a script on webmaster world that mostly does what I need it to, but have been making modifications to tailor it to my specific needs.I know that //..*/ tells awk to ignore hidden directories, how do I define more directories to ignore? (i.e. temp, var, etc)? I've tried playing with prune before the awk command with limited success...I know that there are many ways to do the same thing and keep running into brick walls.

View 11 Replies View Related

General :: Exclude Does Not Work With Tar Command

Jul 6, 2011

I don't know why --exclude doesn't work when I use tar command. Please see this code
Code:
mahmood@pc:~$ l a/
1.txt 2.txt 3.txt b/
mahmood@pc:~$ tar cvjf compressed.tar.bz2 --exclude=/home/mahmood/a/b/ a/
a/
a/2.txt
a/1.txt
a/3.txt
a/b/
mahmood@pc:~$
As you can see although I excluded b/ but tar command ignored that.

View 2 Replies View Related

Programming :: Find Syntax Exclude Certain Extensions And Filter By Age

May 26, 2010

I'm trying to find all the files in a specified directory that do NOT end in .archived or .error and are older than 30 mins. Currently I have: Code: find /opt/edi/incoming -type f ! ( -name "*.archived" -name "*.error" ) -cmin 30 But I keep returning files that end in those extensions and I'm not sure if I'm using -cmin correcty? If there is a better way to do this (perl, etc) I'm open to options, this is for a nagios check.

View 2 Replies View Related

Ubuntu :: Exclude File From Terminal Command?

Jul 12, 2010

Well i downloaded a program with many .deb files ( At least 15 ) so i wanna execute them all trough the terminal so i typed

Code:
patowlmc@patowlmc-desktop:~$ cd /home/patowlmc/Downloads/i386
patowlmc@patowlmc-desktop:~/Downloads/i386$ sudo dpkg -i *.deb
Readme.deb: command not found

As you can see all files in the folder are .deb packages, but one: The Readme file, wich is a text file.

I know I just have to move the file to somewhere else, and everything should work, but i wanna know if there's a command for excluding a file or something.

P.D. I totally trust the program, so don't worry about so many .deb files.

View 9 Replies View Related

General :: Find Mechanism With Irregular Expression (find Command) Or Perl?

Sep 7, 2010

I have 4 Linux machines with cluster.My target is to find all kind of IP address (xxx.xxx.xxx.xxx) in every file in the linux system remark: need to scan each file in the linux system and verify if the file include IP address if yes need to print the IP as the following

more /etc/inet/file.example1

182.23.2.4
255.255.0.0
10.10.1.1

View 1 Replies View Related

Ubuntu Security :: GRsync --Exclude Command Syntax / Backup A Whole Startup Disk To Another?

Jul 19, 2010

I'm trying to backup a whole startup disk to another with GRSYNC but I don't need some files or directories. For example, I don't want to backup my 'swapfile1' (I do not have a dedicated swap partition) or the 'media' directory' in order to no enter a looping sync.I've searched the web for the correct syntax of the --exclude command but none have worked if applied in the advanced option "before" rsync starts. These a sample of NOT workin syntaxes:

exclude /media or -- exclude 'media' or -- exclude "media"

same for swapfile1:

exclude swapfile1 or -- exclude 'swapfile1' or -- exclude "swapfile1"

View 7 Replies View Related

General :: Find/grep/wc Command To Find Matching Files - Print Filename And Word Count?

Sep 11, 2009

I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:

wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;

View 10 Replies View Related

General :: Command Line - Use Find To Find Text Files?

Jul 15, 2011

Is there a way to specify to find that I only want text files (and not binary files)? Grep has an option to exclude binary files, so I thought find probably has a similar feature, but I've been unable to find it.

View 2 Replies View Related

General :: Find Setuid Files Using FIND Command?

Jan 25, 2009

I know how to search for normal files but can you let me know " How to search for 5 setuid files on the system. Also explain, for each file, why setuid mechanism is necessary for the command to function properly"

View 1 Replies View Related

General :: Find A File In Directories Without Using Find Command?

Aug 3, 2010

am new to linux and trying to find a file in sub directories using find command as:find .-name *.jpg -type fBut I am unable to get the result as find command is not permitted by the server administrator.Is there any way to find files without using find command.

View 14 Replies View Related

General :: Run A Command Per File From The Output Of "find" Command?

Sep 8, 2010

I want to scan a particular directory recursively and run a particular command with each file as input. For this I am using "find /dir/path". I dont want to write any long script containing loop on the output of "find". I want a single command which will allow me to run a command on each file of the "find" command output.

View 3 Replies View Related

General :: Don't Get Find Command

Mar 31, 2010

When I run find command with exec option, it just hangs on me. what am I doing wrong?

find /stdlist -type d -mtime 0 -exec cp -r {} joblogs ;

View 7 Replies View Related

General :: How To Exclude Last Several Characters?

Aug 17, 2010

any tips from you guys on how to filter my awk output?I want to exclude last 5 characters using awk in my tcpdump result.I don't want to include ".443:" in my tcpdump using awk.

View 6 Replies View Related

General :: How To Exclude Sub Directories From ZIP CLI

Jul 22, 2010

I'm trying to create backup/archive my Ubuntu 10.04 system files (so I can restore it in case my system get corrupted). More specifically, I'm trying to zip the important files in my root directory not including my home directory (which includes my documents which I backup separately/more frequently) to an external hard drive attached via USB (called 'My Book').Since File Roller didn't give me quite the level of control I was looking for, I created a script that I could execute to backup and archive regularly.

View 1 Replies View Related

General :: Rsync - Exclude-from Qns ?

Jan 8, 2011

I'm trying to do a sync of the root home directory to a folder call backup and excluding some files.

This is wat i executed:

rsync -a /root/ --exclude-from '/root/rules.txt' /root/backup/

My rules.txt is as below:

- anaconda-ks.cfg

Somehow it doesnt read the rules.txt and it will always include the anaconda-ks.cfg file.

View 3 Replies View Related

General :: How To Know If The Command Find Any Result

Oct 21, 2010

#!/bin/shLOOK_FOR="NTLMAuthenticationFilter"for i in `find ./ -name "*jar"`doecho "Looking in $i ..."grepjar -e $LOOK_FOR $idoneI wrote the script above, and try to find if there any file name LOOK_FOR exist in those jar,my quest is: grepjar -e $LOOK_FOR $ihere how can I check if there are any successful result , and output them ?

View 2 Replies View Related

General :: Difference Between *.xml And *.xml In Find Command?

Nov 1, 2010

What is the difference between *.xml and *.xml in find command in Linux/macThe results of:find . -name *.xml and find . -name *.xml are different. But why?Also, is locate '*.xml' better than find? Which one is the most commonly used?

View 1 Replies View Related

General :: Command To Find Only Mtime?

Aug 12, 2010

I've got a script where I have to parse out the last modified time for a large amount of files. Piping the output for "ls" into "cut" seems to work most of the time, but the output is unpredictable.The "fields" argument doesn't find the date modified columns consistently, and using character count is as well since the output can vary in width depending on the file name

View 3 Replies View Related

General :: Getting The Command To Find Out Users?

May 17, 2010

I want to know the command which will list the local users created by me not system users.

View 6 Replies View Related

General :: Command To Find The SD Card?

Jun 13, 2010

How to find info and contents of the SD card via linux terminal. I found a command "mount"in internet. According to it it's in dev/sdb/.. but I didn't found such. I saw dev/sdc/

View 5 Replies View Related

General :: Command To Find Distribution?

Jan 20, 2011

command to find the Distribution of Linux.

View 7 Replies View Related

General :: Find Out PID Of A Command Which Is In History?

Jun 20, 2011

If someone has done something wrong on a shared linux machine. If i want to find out who is that person or ip from where it is been done what are all the possible ways. 1 possibility I thought was to get the PID of the command and get other details from that PID?

View 4 Replies View Related

General :: Find Most Used Command In Distribution?

Oct 27, 2010

t has been long time since i used the command that used to display the most widely used command in the distribution .It was in following format.(I guess it was a combination of history head sort grep or something like that)

50 ls -ltr
3 neat-tui
1 touch abc

I tried finding the command in google but wasnt able to find it

View 1 Replies View Related

General :: Refine The Find Command?

Jul 12, 2010

Ive tried to rsync from one ~/home on hdd a, to ~/home hdd b, using a live cd, but it returns a load of; eg:

rsync: opendir "/media/a2ab9331-effd-4855-8e0a-6c7f1a9d63b5/home/nnjond/.Skype" failed: Permission denied (13)

So i think i should fresh install and it would be convenient if i knew the refined commands to locate the saved files in /home hdd a, since 02_06_10 (not including all the hidden or deleted files), and then copy to a memory stick using the nautilus gui.

View 2 Replies View Related

General :: Can Grep Exclude Symlinks?

Oct 15, 2010

I tried to run one grep that excludes symlinks and pipe it into a second that searches for my pattern but I continue to get the recursive directory loop error. As a result (I think) my grep is incomplete as the search just loops between directories symlinked together.

View 7 Replies View Related







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