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.
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"
I'm looking for a script that can do two things: (1) determine the shortname of the user with the largest account in /Users and (2) look up their full/long name. I'm going to use this script to help identify who the user on a computer and while I know that's possible that a sometime-user may have a larger account than the normal-user on any given computer, the results of a script should be sufficient in most cases for my needs.I'm not sure the best way to around this. I know that can use "du -m -d1 /Users" as root:
root on torchwood [ ~ ]$ du -m -d1 /Users 157 /Users/admin
Is there a method at the command line to copy files from one location to another and retain the source files group and user?I'm migrating some MySQL files from one machine to another.I want to back-up the original files in the directory presently. They have owner:group of mysql, some have owner:group root:mysql and so on. To copy them under cli or Nautilus everything changes to root for I execute sudo cp or gksudo nautilus and copy via gui.
Since it is MySQL data I could simply do a dump of the database and restore it on the other machine. But there's about 20 db's and I want to do this via a copy for it will be faster - at least that is what I think.
The find command does not seem to find all files in my directory hierarchy. My home directory is automounted from a server. The command to illustrate this is:find | sed -e 's/^.///' | sed -e 's//.*//' | sort -uThe result misses several directories. Likewise, a find of a particular file, like:find . -iname *sample* -printwhere sample_file.txt resides in one of the directories that is missing in the first find command, finds nothing
The problem I have is that I need to replace a more complex string, like this: Old string: /mnt/stor6-wc2-dfw1/627896/982574/ New string: /mnt/stor8-wc2-dfw1/369587/302589/ There I don't know how to do it... since the / is what separates the old from the new strings, and the strings that I want to replace have / in it. Also, I would like to know how to specify under what folder replace the files, for example, I want that it search/replaces all files under /var/www/mysite/htdocs folder.
shell scripting in Fedora14I want a script"Find in curent folder for files, and it copy first file he find with name gived by user, if name already exist then echo error message and finish"command usage " bash scriptname copyASname"
smthing like Code: #!/bin/bash for files in /home/user/* do
I am searching for a Linux user level command/utility to measure the network bandwitdth used by a specific process by usig its process id.i used different commands like, iperf, ntop, netstat etc, but it doesn't to meet my requirement. i need to observe network bandwidth used by only a specific process .
Is there a non-root shell command that can tell me if a user's account is disabled or not? note that there is a fine distinction between LOCKING and DISABLED:
LOCKING is where you prepend ! or * or !! to the password field of the /etc/passwd file. On Linux systems that shadow the passwords, this marker flag may be placed in /etc/shadow instead of /etc/passwd. Password locking can be done (at a shell prompt) via password -l username (as root) to lock the account of username, and the use of the option -u will unlock it.
DISABLING an account is done by setting the expiration time of the user account to some point in the past. This can be done with chage -E 0 username, which sets the expiration date to 0 days after the Unix epoch. Setting it to -1 will disable the use of the expiration date.
The effect of locking to to prevent the login process from using a supplied password to hash correctly against the saved hash (by virtue of the fact that the pre-pended marker character(s) are not valid output character(s) for the hash, thus no possible input can ever be used to generate a hash that would match it). The effect of disabling is to prevent any process from using an account because the expiration date of the account has already passed.For my situation, the use of locking is not sufficient because a user might still be able to login, e.g. using ssh authentication tokens, and processes under that user can still spawn other processes. Thus, we have accounts that are enabled or disabled, not just locked. We already know how to disable and enable the account - it requires root access and the use of chage, as shown above.To repeat my question: is there a shell command which can be run without root privileges which can output the status of this account expiration info for a given user? this is intended for use on a Red Hat Enterprise 5.4 system.The output is being returned to a java process which can then parse the output as needed, or make use of the return code.
I did a cleanup on old user ids on my server several months ago. One of the user ids was 1005.. When i check the quota page on webmin, it says that userid 1005 is using 8.40 GB on the system, but I can't find those files anywhere! The home folder was deleted with the user ids, so I'm not sure what the username was to begin with.If I check the passwd file - there is no 1005 listed. So i did a find / uid 1005 and I tried a find / -nouser command.. Neither list files owned by 1005. How can I find where those 8.4 GB of files are?edit: when I do a du -sch * to find space being used.. there is only 5 folders within the /home that could have 8G in there .. (assumeing du -sch shows all files, including hidden).. du -sch * from / shows only possible location is in the /home folder
How do I find files in opensuse 11.2 without using the command line. I see in dolphin "nepomuksearch", but it doesn't work. Even in the command line you cannot whereis a file like Monday, Monday.mp3. whereis also seems to be case sensitive.
My goal is to find all pdf files on a remote machine, so I resort to the useful command find. So I type find .pdf or find .pdf" and I get nothing. I do the same on my machine and I get nothing. I do a regular search from the menu on my machine and I find quite a few pdf files. Would somebody please tell me what am I doing wrong?
Initially, I was trying to get around a Nautilus log in error. Using this, I was able to log in, but I entered what seems to be a perfectly clean version of Ubuntu...with no access to my files. [URL].... Now, I can't seem to find any of my original files. Some of the commands I entered in the terminal included:
I'm afraid that I may have deleted the files, or have moved them to another user or someplace on the drive I can't see.
I've got 2 problems:1. How can I use the find command to search for devices files?2. I need to find all files thaare 6 months (or more) old and that have a size of 2 Mo or more. What would the code look like?Oh and also, how can I use the cat command to insert text in a file?
command line, I have a server for work that I ssh into and I need to be able to find multiple files (they have the leading text just the date identifier changes) and then zip the files (with bzip) them and then finally scp(Secure copy) them to another server.
These files are always in the same directory and this is a daily task and just want to make into a script that I run once I am logged into the remote server.
i cant connect with 3g modem.I've tried with vodafone and 3 ireland.THE SOFTWARE ICON IS ON SCREEN WITH BOTH MODEMS but when i try to run they cant find autorun files is there a comand to run these files their in media/3connect/autorun.exe.do i need permissions or something