General :: Hiding A File Using Unlink Command?

Feb 1, 2011

While googling for soft link and hard link i found this part

Code:
{
FILE *fp;
fp = fopen("some.hidden.file","w");
unlink("some.hidden.file"); /* deletes the filename part */
/* some.hidden.file no longer has a filename and is truely hidden */
fprintf(fp,"This data won't be found
"); /* access the data part */

[Code]...

View 9 Replies


ADVERTISEMENT

Red Hat :: Excluding Unlink To A Particular File In Audit.rules?

Apr 11, 2011

I am running RHEL 5.4 Server (32-bit) and have my audit.rules file set up per a template that I am required to use. There is one particular rule that audit is auditing the unlink of files. With this set, my log files are filling up very fast, as there is a particular app that constantly touches/ deletes a couple of files, which the unlink is catching. Here is the audit rule:-a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k deleteI commented out the "-S unlink" and my logging returns to normal (as expected). For right now, I was wondering if there was a way to set this rule up to exclude these couple of files from what auditd is capturing?

View 1 Replies View Related

Red Hat / Fedora :: Excluding Unlink To A Particular File In Audit.rules?

Apr 11, 2011

I am running RHEL 5.4 Server (32-bit) and have my audit.rules file set up per a template that I am required to use. There is one particular rule that audit is auditing the unlink of files. With this set, my log files are filling up very fast, as there is a particular app that constantly touches/ deletes a couple of files, which the unlink is catching. Here is the audit rule:-a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k deleteI commented out the "-S unlink" and my logging returns to normal (as expected). For right now, I was wondering if there was a way to set this rule up to exclude these couple of files from what auditd is capturing?

View 1 Replies View Related

General :: Unlink Com Port And REDHAT Installation Files?

Jun 1, 2011

I tried to link USB to com port. Mistakenly I managed to link to one USB several ports. How can I unlink them in order to have only one linked? This is how it looks like!

lrwxrwxrwx. 12 May 26 16:26 com03 -> /dev/ttyUSB0
lrwxrwxrwx. 12 May 26 16:17 com10 -> /dev/ttyUSB0
lrwxrwxrwx. 12 May 26 16:22 com2 -> /dev/ttyUSB0
lrwxrwxrwx. 12 May 26 16:26 com3 -> /dev/ttyUSB0
lrwxrwxrwx. 12 May 26 16:27 com4 -> /dev/ttyUSB0

And second question, I have installation files for Redhat(73, 8, 9). Can I install them to Fedora 14? If yes, could you? please, help me with commands?

View 1 Replies View Related

Ubuntu :: Hiding The JAR File Extension?

May 5, 2011

I installed Minecraft and I want to hide the .JAR extension on the file on my desktop. I tried just renaming it and deleting the ".jar" from the name, but when I tried opening it, it opened as an archive, rather than an executable, even though I had the "Allow executing file as program." box checked off. What can I do to hide the extension?

View 1 Replies View Related

Programming :: Zenity - Hiding Hidden Files From File Selections?

Sep 12, 2010

I'm using zenity 2.28.0 in a bash script (under kde4) to select multiple files in a directory. It works fine, but always defaults to showing hidden files. How can I get it to hide hidden files by default?

I know about toggling them on and off with Ctrl-H, but I would prefer not to have to use that. I have my options set so that dolphin and konqueror do not show hidden files by default. I even tried adding shopt -u dotglob to my script. zenity invocation (extracted from a more complex statement): zenity --title "Select Print Files to Delete" --file-selection --multiple

View 5 Replies View Related

Ubuntu :: Hiding The Icon Of A Mounted File System Icons From Desktop?

Mar 16, 2011

10.04 LTS: Is there a way to hide an icon of a mounted file system from the GNOME desktop?

View 8 Replies View Related

Software :: Unlink Action From Keycode ?

Jun 9, 2010

I am trying to unlink the action triggered by my fn-F5 key, which is a toggle wlan action.

I really don't know were this kind of action is defined, but I want to replace it by another one.

It should happen either by unlinking that action or by overriding.

The key is catched by HAL:

View 4 Replies View Related

General :: Append Command Output To File By Giving Command In Terminal?

Jul 3, 2009

I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?

View 4 Replies View Related

General :: Hiding / Masking The Username / Password?

Mar 15, 2010

I currently have a UNIX script with a function that uses a username and password to connect to the database, retrieve some information and then exit. At the moment, am getting the username and password from a hidden plain text file and permission set to -r--------, i.e. read only to who own the file. The owner of the file is the same owner of the script. At the moment, am not too overly concern as the script works as it is but I want to know if anyone have a suggestion if there is any better way of achieving the same thing with some "form" of security, i.e., for example, masking the username/password.

Basically, I want to be able to mask or hide the username or password in some way. I've thought about encryting the password file, which is in plain text, using simple crypt command from which I retrieve the username and password but I need to decrypt it as well which is sort of similar to how it will be as it is now once it is decrypted. Is there anyway that I can get a username and password in some gibberish format and then translating them into something usable which can be passed on the next command that requires the username/password.

View 2 Replies View Related

General :: Convert An HTML Email Saved As A Text File To A PDF File From The Command Line?

Aug 23, 2011

I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.

Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?

View 1 Replies View Related

General :: Retrieve The File Which Got Removed From File System Using Rm Command?

Nov 23, 2010

As in windows all the delted items will got to RecycleBin is there any such thing in linux.

(Or)

Can we retrive the file which got removed from file system(using rm command)

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

Red Hat / Fedora :: What Happens When A Process Executes Unlink(".");

Feb 19, 2010

What happens when a process executes unlink(".");

What is the current directory of the process ? (Assume superuser permissions are given.)

View 1 Replies View Related

General :: Compile And Run A Cpp File Using Only One Command?

Jun 24, 2010

Recently I've started to learn cpp language on linux,and now I run a cpp file using following commands. g++ -o xxx xxx.cpp./xxxIs there a way to make it one line command such as compile-and-run xxx.cpp?

View 5 Replies View Related

General :: Command To Run Update File?

Jul 7, 2010

It says to run update.php from the maintenance folder. What command do I type to run an update file?

View 5 Replies View Related

General :: Execute A Command Whenever A File Changes?

Aug 27, 2010

I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with that file. Currently, I'm using this: while read; do ./myfile.py ; done And then I need to go to that terminal and press Enter, whenever I save that file on my editor. What I want is something like this: while sleep_until_file_has_changed myfile.py ; do ./myfile.py ; done

Or any other solution as easy as that. BTW: I'm using Vim, and I know I can add an autocommand to run something on BufWrite, but this is not the kind of solution I want now. Update: I want something simple, discardable if possible. What's more, I want something to run in a terminal because I want to see the program output (I want to see error messages).

View 7 Replies View Related

General :: CAT Command - No Such File Existed

Oct 24, 2010

I am using the BackTrack 4 Live CD...and when I entered the "cat" command, it told me that no such command existed. I made absolutely sure that I a entering the command correctly. It just comes up with the word cat in quotes and says "no such file" or "no such command" something of that nature.

View 2 Replies View Related

General :: Command - Checking File Name ?

Mar 31, 2011

I need to check the file name e.g. testbla_word.txt

Is theire a command to search for only "bla_"?

So mainly, to check a part of a filename (not the entire filename, only a part of it)

View 5 Replies View Related

General :: How To Retrieve File Deleted Using RM Command

Dec 2, 2009

How can I retrieve the file in LINUX which I have deleted using 'rm' command .???

View 1 Replies View Related

General :: How To Print Command Output To A File

Apr 29, 2010

I am creating a script to sync my important documents between two system. I want my script to generate a log file for the last action. can you suggest me a way to achieve this.Question: If I execute the rsync command with -v flag, it will print a lot of messages on the console. Is there any way. So, I can redirect these logs to a file?

View 4 Replies View Related

General :: Copy A File From Windows With Scp Command?

Aug 18, 2010

I would like copy a backup file from image vmware linux to windows but i don't know how to process it ?i tried :scp /source/backup.tar.gz admin@x.x.x.x:/c:ProgrammefilesC:Documentsand SettingsAdminMyDocumentsbut error and i know that it's not like that, so if you have solutions

View 2 Replies View Related

General :: Tool To Run A Command When File Changed?

Sep 16, 2010

Does anybody know of tool for Linux that can watch a custom subtree of the filesystem for changes, and executes a custom command when a change occurs ? Such a tool would be very useful to quickly setup automatic building or uploading of source files.

View 1 Replies View Related

General :: Command - Encrypt A File Or Directory?

Feb 23, 2011

What 's the most popular command to do such things in terminal in linux?

View 4 Replies View Related

General :: What Is The Equivalent File Command For Windows

Apr 18, 2011

Running the command: file run.sh Gives me: run.sh: Bourne shell script text executable in Linux. Is there an equivalent command in Windows?

View 4 Replies View Related

General :: Pass A File That Changes Name To Another Command In Bash?

Jun 9, 2011

I frequently use wget to download tarballs and zip files from the web, then either untar then or gunzip them. I do:

Is there a way for me to automatically pass the zip file to tar or unzip WHILE wget-ting?

In pseudocode: wget google.com/somfile.zip && unzip

View 3 Replies View Related

General :: Redirecting Command Output To File?

Sep 19, 2011

This seems so simple when doing it from command line but I'm not able to accomplish it inside a script. I am trying to put output of following command into a text file:

CMD= mysql -uroot -psecret -e 'SHOW SLAVE STATUS G;'
FIL=~/replication-`date +%F`.txt
MAILTEXT=~/mailtext.txt
touch $FIL
$CMD > $FIL

Where FIL is a variable that contains path of the file to which to output command. I am running this command in a shell script from where I want to email contents of $FIL as attachment using mutt. But I am always getting 0 byte file. Also if I examine in directory the file is of 0 byte length.

View 3 Replies View Related

General :: Command For Adding Groups To A File?

May 15, 2010

What is the best command for adding groups to a file?

View 2 Replies View Related

General :: What Is Keyboard Command To Go To End Of File In Nano

Apr 4, 2011

control + v allows you to scroll page by page through a file. But I have a really long file and I would like to go to the end of it. what is keyboard command to go to end of file in nano?

View 3 Replies View Related

General :: Download A File From Command Line?

Apr 8, 2011

Let's say i have a link to a file http://www.domain.com/dir/myfile.ext

Is there a command line tool that will allow me to download this file. I'm looking for something like: download <http address> ... is there anything that simple?

View 2 Replies View Related







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