General :: Remove Files Which Have A Certain Syntax

Jan 23, 2011

I have a couple of files which follow this syntax:

*_yyyy-mm-dd_hhhmmm.*

Example:

*_2010-01-01_00h10m.*
*_2010-01-01_01h10m.*
*_2010-01-01_02h10m.*

[Code].....

and delete the others. or maybe move them to a subdirectory to be safe...

View 2 Replies


ADVERTISEMENT

General :: Sed Syntax To Remove Xml

Mar 13, 2011

I'm trying to sanitize this output from it's metadata to plug this output into GreekTools, but I am getting stuck on sed.

View 2 Replies View Related

General :: Command Syntax To Modify Multiple Files

Sep 26, 2009

I have a program I use, rrdtool. I need to modify a ds value on every file at the same time. However, using a wildcard (*) to try this operation of all files does not work and instead only updates one file.

Here is the command syntax:
rrdtool tune <file> --maximum traffic_in:100000000000 && rrdtool tune <file> --maximum traffic_out:100000000000
So, how can I do this on every file in the directory?

View 5 Replies View Related

General :: Can't Open File/abcd/configFiles/vim/syntax/syntax.vim?

Mar 7, 2011

When ever i open vim, i get the error that the following error: E484: Can't open file/abcd/configFiles/vim/syntax/syntax.vim There was a .vimrc file in my home folder that i have removed.

Still i keep getting the same error. Presently in my home folder there is no .gvimrc or .vimrc file.

But still i keep getting the same error. I am not too sure where this file is mentioned.

Background info: The SHELL has been changed from tcsh to bash Earlier i had created a .vimrc file in tcsh, i have removed the .vimrc in bash SHELL.

View 1 Replies View Related

General :: SUSE 10 Syslog-ng Syntax - Bash: Syntax Error Near Unexpected Token "("

Apr 20, 2011

I am a Novell (now defunct) CNE tring to learn Linux and am having a lot of trouble finding out where the WB 6-6 is wrong in the syntax for adding local4... the the syslog-ng config file. In the instructions there are discrepancies between commas and simi-comma, they are both in the statements in no particular order. there is no pattern to them. Here is what the book shows:

filter f_local4debug { level(debug) and facility(local4); };

When I try to input this in the Gnome terminal window to try and find out where it goes wrong I get the following: -bash: syntax error near unexpected token "(" If I can get the correct syntax I belive I can use the info to get past the rest of this portion of the lesson. I am desperate to learn Linux as the only jobs out there for a Novell CNE are migrations to MS, which really sucks, since MS really really sucks.

View 1 Replies View Related

Software :: Dpkg - Add / Remove Package Won't Work - Terminal Goes: Bash Syntax Error Near Unexpected Token `newline'

Mar 11, 2010

When I am adding removing packages to get more hard drive space, this is not the first time I left too many pages open and it crashes on me. My son would fix it by typing in the terminal sudo something, but I want to know how to do this. The only thing not working is the add/remove packages at the moment. Here is what it said, E:dpkg was interrupted you must manually run 'dpkg--configure -a' to correct the problem E: _cache-open()failed please report. Please, could someone tell me how to get the default back or whatever. When I type in the terminal, it refused my password until I tried several times, plus, it finally says in the terminal No such command. Bash. No such command. I am hoping this question is one you do recognize the answer for.

I tried using Yum to remove the package. Like this:

To remove or uninstall a package:

Code:

yum -y remove ,package name>

Terminal goes: Bash syntax error near unexpected token `newline'

View 3 Replies View Related

Software :: Sed Syntax For Binary Wrapped EPS Files

Oct 8, 2010

I'm having a problem with sed syntax. So far I can sed the HiResBoundingBox to capture the images I want and output to pdf. But now ever so often I get an illustrator file that has hexadecimal values at the start and end of the file. Imagemagick powers through this and still creates the rastorized previews I want but the gs dies using the epstopdf script to output the vector files. If I hand remove the hex on both ends of the file, both functions work fine and the file can still be managed in illustrator but if I resave it the hex comes back. It only happens on a few files plus it seems to serve no purpose as the files work perfectly without it. I cannot get the sed statement to work. I've tried a blue million variations with no luck. Copied some that I found, same result.

Start of bad eps file:
ADOƆ ^@^@^@5O
^@^@^@^@^@^@^@^@^@UO
^@im^K^@yy^@^@%!PS-Adobe-3.1 EPSF-3.0^M

The way I need it to look:
%!PS-Adobe-3.1 EPSF-3.0^M
End of file the same:
%AI9_PrivateDataEnd^M
@ @
just needs to be:
%AI9_PrivateDataEnd^M
Tried
sed -n '/%/,$p' < = blank file
sed -i 's/%/,$!d/g' = same
sed 's/%/,$!d/g' = same
sed 's/%/,$!d' = same

I can't seem to find any proper reference to this.

View 1 Replies View Related

Software :: Merging Files Together Based On Latex Syntax?

Mar 4, 2010

I have a latex code file which links itself to many other latex files. The syntax is as follows:input{*path of file to be inputed*}The path is relative to the current working directory, so if my file is stored in /home/kevin/mybook.tex and I want to include a file in /home/kevin/latexstuff/copyleft.tex I simply write:input{latexstuff/copyleft.tex}

The latex compiler includes these files just as if they had been copied and pasted into the main latex file at the point specified. My problem is that I have a document which depends on quite a bit of these input commands,ut I am trying to use a latex preprocessor (ratexdb, adds database fields to your latex documentshich does not support input commands, leaving my file only half processed.So I was wondering: is there any easy way to parse through my main file, detect only the input commands, interpret the syntax and include the files specified (where specified)nd produce a second, populated file, which can then be processed by ratexdb?

View 2 Replies View Related

Software :: Vim - Command Input For Creating Syntax Files

Jan 25, 2011

There is a syntactical feature I would like to see in Vim, and so I thought to write myself a syntax file for my needs, but I am having trouble finding the exact type of syntax highlighting I want to incorporate'emulate. Currently in Vim, from the terminal instead of say gvim, when I place my cursor over a parenthesis or brace, the corresponding brace or parenthesis will highlight, or block its character. In my case, instead of a single character they will be full words specified within the syntax file.

I want to do something similar. For example if my document has three words:
Group
Element1
Element2

I want the syntax file to tell Vim that when I have my cursor over the word Element1 or Element2 that Group will become highlighted. In the same, to have the cursor over Group will cause both Element1 and Element2 to highlight. I have looked here but understanding still eludes me: [URL]. I would also be happy with creating some sort of command input, where I type in the group name and the elements highlight. Like a very specific search function that searches for only and all instances that are contained within the group named.

View 4 Replies View Related

General :: Unable To Remove Files Using Rm -rf *?

Jun 22, 2010

Output of my terminal:

linuxx86:110$ rm -rf *
rm: cannot remove `dttscopeger.dir/.nfs00000000012821280000ec25': Device or resource busy
rm: cannot remove `dttscopeger.dir/.nfs00000000015561050000ec26': Device or resource busy

[code]...

View 6 Replies View Related

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 :: Remove Temporary Files?

Apr 11, 2010

me with proper syntax / command to remove temporary files in linux

View 9 Replies View Related

General :: How To Remove All Files That Created N Minutes Ago

Mar 4, 2010

I guess in most cases when extracting a tar achive ,we will get a directory with the same name as the archive file but different suffix. but in some unlucky case, as I met today, after extract a tar bar I find lots of files spread in the working directory, which is really nuisance.so what I want to learn from you is that how can I move thoes newly created files ? I know it should be some "find plus rm" fancy approch there, but I don't know exactly how.

View 3 Replies View Related

General :: Remove All The Files Which Has A String In A File?

May 8, 2010

I am trying to remove all the files in a directory hierarchy which a certain string inside the file (not the file name, it is the file content).

I can list out all the file name which has a string in the file using 'grep -r -l mystringlooking for'.

But how can I remove all the files returned by the grep ? I am trying this on ubuntu.

View 1 Replies View Related

General :: Remove Files In Remote Host Using Ssh?

May 25, 2011

I need to delete all files inside remote directory using ssh P.S. The directory must not be deleted, so @Wes answer is not what I need. If it would be local dir, I would run "rm -rf dir/*"

View 4 Replies View Related

General :: Remove Files That Contain A Specific String?

Feb 17, 2010

How can you remove files containing a specific string?I have...Code:find |grep 'string'This may return several results and I wanted to rm the results.I also have...Code:ls -l |grep 'string'|awk '{print $9}'which also may return results.But point is, I can't supply the results as a parameter to rmI was thinking of looping but I don't know how to access the results as if they were an array or something.

View 5 Replies View Related

General :: Remove Duplicate Files From Two Folders?

Aug 19, 2010

I have two folders - Folder abc and Folder xyz which contains 1000's of files with few of them having the same file names. How can I remove the duplicates from Folder abc?

View 14 Replies View Related

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 View Related

General :: Remove Extra Characters From Multiple Files

Sep 18, 2011

I have a directory (Linux user) with a number of files which contain an added [!] to the end of each file name so that each file reads out as:
foo something [!].zip
bar something [!].zip
helloworld [!].zip
etc.
What is the quickest way to batch rename these to remove the ending [!] character combination from these file names?

View 2 Replies View Related

General :: Change Attributes Or Remove Files With The E Attribute Set

Jul 6, 2011

I have a bunch of files on a usb stick that have just the e attribute set. So I can't chattr them, rm -f fails and chmod fails, all whether as user or root. How can I get rid of the e attribute? Failing that, how can I get rid of the files?

View 3 Replies View Related

General :: Remove Software That Views Image Files?

Jun 22, 2011

I am considering removing all programs and software that handle images so that you cannot view images on the computer and .jpeg would be an unrecognizable file. It's impossible to remove the program that views images in Windows since Explorer is that program - a central Windows component, but I wonder if it is possible to use an alternative operating system like linux and remove the programs that handle images without affecting the system.

I need to do this because of the following problem. I had an internet filter installed but it became useless once certain proxy/circumventor sites such as www.ibypass.com were discovered, which allowed access to any website on the internet. Blocking proxy sites does not work because you can type "https" at the beginning of some of these web addresses and the internet filter cannot keep track of the secure browsing

View 12 Replies View Related

General :: Cron To Remove All Files Within Directory Except One File?

Jun 28, 2010

I would like to create a cronjob that will delete all files within a directory 1 hours after it is created to the folderI found this cron find /path/to/file/* -ctime +1 -exec rm {} ; but it's deleted all files.I want to make an exception, all file should be deleted except one file (letsay file a.zip)

View 16 Replies View Related

General :: Remove Multiple Photorec Files (recup_dir.)?

Jan 13, 2010

I was doing some data recovery with Photorec and by the time I was done I have over 700 folders (recup_dir.).The only solution I was able to apply was the one posted by pljvaldez on this site dated 04-09-08, 09:01 AM. After doing the same thing for at least 70 times I decided to ask, so, is there anyone that knows how to delete multiple folders at the same time.

View 2 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

General :: Remove Root Files From Home Folder?

Mar 30, 2010

i tried to run lame install. on debian lenny amd64.

sudo sh /home/levi/Desktop/lame-3.98.4/install.sh

it returned errors, and i gave up on that. but it has placed a bunch of files and directories in my home folder(not in Desktop)which are owned by root. how may i delete them?

folders are
ACM
debian
Dll
doc

[Code].....

mv: cannot move ..... to ... No such file or directory. which i at least FEEL is certainly not the case.

View 3 Replies View Related

General :: Recursively Remove Subdirectories And Files But Not The First Parent Directory?

Feb 11, 2010

I'm able to use the following to remove the target directory and recursively all of its subdirectories and contents. find '/target/directory/' -type d -name '*' -print0 | xargs -0 rm -rf

However, I do not want the target directory to be removed. How can I remove just the files in the target, the subdirectories, and their contents?

View 4 Replies View Related

General :: Can't Delete Files From External Hard Disk / Remove It?

Mar 26, 2010

Can't delete files from external hard disk.
Getting message,"Input output error or unreadable/corrupted file"

Is there any way to delete this?

View 1 Replies View Related

General :: Manually Remove .vdi Files Left Over After Deleting VirtualBox?

Oct 24, 2010

I have a question, that may sound silly. I have removed VirtualBox from my Ubuntu install. But the .VirtualBox folder is still existing with a virtual drive of nearly 10 GB. Can I manually remove the folder .VirtualBox with rm -rf without any unwanted side effects?

View 2 Replies View Related

General :: Del Command To Remove Files To Directory Instead Of Completely Deleting Them?

Dec 2, 2010

how to write a script so that when I use the 'del' command it removes/sends the files / folders to a I specify for example 'dustbin'

View 1 Replies View Related

General :: How To Remove Rwx Permission For Group And Other Users For All Hidden Files

Nov 29, 2010

How would i remove rwx permission for group and other users for all hidden files (except . and ..) inside /root using a one line command.

View 4 Replies View Related







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