Hello.
How can I Generate the files name in a directory into a TXT file? I mean is create a list if files.
Tnx.
Hello Folks.
I'm searching for a easy way to rename multiple files from CLI but didn't find any easy way for me so I'm reaching out to you guys for help.
This is what I want to do (from CLII or script). I want to move files with a sequence number on the name of the files (msg0000, msg0001, msg0002 and so on) to let's say msg0066, msg0067 and so on. Each of this file name has two other files (msg0000.wav, msg0000.WAV and msg0000.txt).
The idea is to move them from one directory to another and following a sequence in the file names, is there a way I can do this pain free?
Any help on this matter will be greatly appreciates and I'm talking about over 100 files I need to move following the sequence of the receiving directory.
Thanks!
hello,
I am trying to rename the file by adding .txt extension and also
before renaming, I want to replace . in file with _
right now file looks like this mdm.201504021628
after execution of my script file name should be mdm_201504021628.txt
#!bin/bash
//reading all files from directory
files=$(hadoop fs
-ls /dl/data/landing/hivedb/lnd_attunity_kpi_db_backup/auth_master |
awk '!/^d/ {print $8}')
for f in $files; do
//using sed to replace . with _ and then feeding to hadoop fs command
sed 's/./\_/g' $f | hadoop fs -mv $f $f.txt
done
Thanks for your help in advance.
Hi guys,
.
For no apparent actions from me, hidden folders and files show
in my /user/home directory, they are as follows:-
folders:
.adobe .cache .config .cups .filezilla .gimp-2.8 .gnupg .gphoto .gstreamer-0.10 .icedtea .java .local .macromedia .mozilla .pki .thumbnails
Files:
.bash_history .bashrc .esd_auth .ICEauthority
In my / directory
File: ./readahead
Seeking help to verify the above folder and files are not from a harmful source or application?
If they do not post any thread to the system, how can I conceal
these folders and files, so that they don't show up any more in
my home and / directory ?
Many thanks.
Don't know how but now when I use ls I get list of files and directories on their own lines. I want the default behavior I had before. When I cd into another directory I have default behavior - horizontal list of files and folders.
SUSE 11. I have issued the command "gzip -r -c directory > archive.gz" over a complete directory tree. I've got no errors or warnings. I can decompress the gz file also without errors, but what I get is a single file which is the concat of all of the original files, including binaries, without posibility of splitting them into the original ones.
I suppose I've lost my files, no?.
Secondary question: why does gzip let me issue that destructive command?
Hello Everyone! I'm somewhat new to linux, and getting my feet wet by building my first linux server.
So what i have is an application that moves/sorts files. Another program that catalogs them.
The problem is that each app uses it's own user. So my question is if there is any way that files owned by prog1user can be read by prog2user?
I have tried doing a chmod -R 755 Directory and that has allowed the second program to see the files, but I'm guessing this has certain security risks (although I'm not so worried about the files in this directory).
Anyways I was wondering if there was a proper way to do this? OS is debian wheezy.
Cheers!
Hi
i need to see the files in opt directory
when i command /opt/filename/...
it is going without error in terminal but not able to open those files
thanks
pon
Hello, I have an embedded linux device. I can connect to the device and I can upload or download files. No problem with this. But, at first connection, I want to connect to "/" directory instead of "/root". In the device file system, there are files ssh_config and sshd_config under /etc/ssh directory. I think I have to do something with these files but I don't know what.
I don't exactly know what mean "/root" and "/" directories. I think that the real root directory is "/" directory which is empty but when I connect with filezilla, the "/root" directory is the default so I had to go back to / directory everytime.
Hey, I'm aware that /etc/ stores config files and in my home directory I also have dot files as well as a .config folder.
And I'm told not to edit /etc/ but create a copy in my home directory to preserve original files. Is it as simple as creating the full path the same as /etc/ and editing it in home folder?
Ideally this is how I hope it works, because I don't want to edit /etc/ and end up with a bunch of custom, non default files.
hey guys,
Let's say I want to find out which log files have related ntp information in them. I use cat and grep to search through the files in /var/log and then export that to a file. this is the command...
# cat /var/log/* | grep ntp > /home/log.txt
The file created from this command will not include the directories the log entries are apart of. Why not? For example, if you do this same command without exporting to the /home/log.txt file it will show you in stdout which directory each log entry is in. Hope I'm making sense here. My question is, is there a clever way to export to a file in a way so that the file created is structured exactly like the stdout of the command below?
# cat /var/log/* | grep ntp