Software :: Find Command For No Login User Files?
Feb 22, 2011
How to find files owned by a user who does not have an interactive shell on the system and copy them to a different location. For Eg : Files owned by UID : 86 in /sbin/nologin needs to be located.
View 4 Replies
ADVERTISEMENT
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
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
Jun 3, 2010
In my system , there are 800 users in it , can advise if I want to find the user(s) who do not have login to the sytem over 180 days ( in the past 180days ) , what is the best way ? thx
View 4 Replies
View Related
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
Dec 13, 2010
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
[code]...
View 1 Replies
View Related
Feb 20, 2011
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.
View 5 Replies
View Related
Aug 9, 2011
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
View 4 Replies
View Related
Oct 11, 2010
I found this command that works great finding and replacing a simple string to another in files located in that folder and all sub-folders.
Code: find . -name '*.php' | xargs perl -pi -e 's/OldText/NewText/g'
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.
View 1 Replies
View Related
May 18, 2011
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
[code]....
View 1 Replies
View Related
Sep 5, 2015
I created a new user with command useradd (as root) :
Code: Select alluseradd razer123
And then set a password with command passwd (as root):
Code: Select allpasswd razer123
No Error!
When I logged out and tried to login with new user, I coulden't! (even after restart!)
I looked into /etc/passwd :
Code: Select allcat /etc/passwd | grep razer123
result:
Code: Select allrazer123:x:1002:1002::/home/razer123:/bin/bash
There is no home folder in the path!
# I have debian 8 and MATE desktop.
View 5 Replies
View Related
Jan 20, 2011
Is there any linux command to find out if a user exists? It should something like this: if user exists it returns 1, if he doesn't it returns 0.
View 3 Replies
View Related
Aug 5, 2009
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 .
View 3 Replies
View Related
May 5, 2010
how do i find the files made by a user on the hole disk?
View 8 Replies
View Related
Jul 30, 2010
Is there any way to find the core files with out using the FIND command?
View 1 Replies
View Related
Aug 10, 2011
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.
View 2 Replies
View Related
Dec 25, 2010
when loggin as a normal user and search for a file passwd under /etc. i get few errors with permission denied.how to ignore this permission denied errors.
csh hostname 109 % find . -name passwd
find: ./lvm/backup: Permission denied
find: ./lvm/archive: Permission denied
[code]....
View 4 Replies
View Related
May 10, 2010
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
View 4 Replies
View Related
May 25, 2010
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.
View 5 Replies
View Related
May 25, 2010
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?
View 5 Replies
View Related
Dec 31, 2010
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:
[code]...
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.
View 6 Replies
View Related
Mar 23, 2010
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?
View 2 Replies
View Related
Mar 2, 2010
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.
View 4 Replies
View Related
Aug 15, 2010
What linux command would an administrator use to find all hidden files on a Unix/Linux server that were generated during the last week?
View 7 Replies
View Related
May 14, 2010
Command to find all of the files which have been accessed within the last 30 days?
View 1 Replies
View Related
Oct 18, 2010
Code:
find "$SOURCEDIR" -type f -name "*$ITEM" -printf "%P
"
I want to apply some shell script to the files outputed by the find command.
How can i do this.?
There are multiple files directories and also multiple files.
View 14 Replies
View Related
Jun 21, 2011
Linux command to find files changed in last n seconds. shell script,that we can run from cli or command.
View 3 Replies
View Related
Sep 7, 2010
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
View 8 Replies
View Related
Dec 21, 2010
i'd like to know the total filesize of all files found with the find command, so
Code:
find -iname '*.mpg' | xargs -I {} du -sh {}
but this gives me the filesize of each file, since each line is passed to "du".
how can I pass the whole list through the pipe?
View 6 Replies
View Related
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