Search Results

Search: Posts Made By: pstein
5,996
Posted By pstein
Usage of #!/bin/sh vs #!/bin/bash shell scripts?
Some question about the usage of shell scripts:
1.) Are the commands of the base shell scripts a subset of bash commands?

2.) Assume I got a long, long script WITHOUT the first line.
How can I...
9,978
Posted By pstein
How to replace with "sed" some hex values by other hex values?
Assume I have a file \usr\home\\somedir\myfile123.txt
and I want to replace all occurencies of the two (concatenated) hex values x'AD' x'A0' bytwo other (concatenated) hex values x'20' x'6E'

...
36,938
Posted By pstein
remove a whole directory tree WITH files inside?
Assume I want to remove a whole directory tree beginning with /foo/bar/
The directory or sub-directories may contain files.

The top directory /foo/bar/ itself should not be deleted.

rm -f- r...
2,215
Posted By pstein
Ok, I though sort -k <n> will start at the n-th...
Ok, I though sort -k <n> will start at the n-th character in a line

Thank you
Peter
2,215
Posted By pstein
"sort -k" does not work
When I issue the following command then the list is NOT sorted starting from column 12:

find . -maxdepth 1 -type f -printf "%10s ($PWD) /%P\n" |sort -k 12

Why?

I tried this as root in...
20,659
Posted By pstein
"find . -printf" without prepended "." path? Getting path to current working directory?
If I enter (simplified):

find . -printf "%p\n"

then all files in the output are prepended by a "." like

./local/share/test23.log

How can achieve that
a.) the leading "./" is omitted...
4,350
Posted By pstein
Thank you but this gives me (under Ubuntu 11.04)...
Thank you but this gives me (under Ubuntu 11.04) the following error:

xargs: crc32: No such file or directory

I assume crc32 and/or xargs is not available here.
Any other solution?

Peter
4,350
Posted By pstein
List all files with prepended CRC32 (or other) hash code?
I would like to list all files in a directory tree but with a prepended digest hash code (like CRC32). CRC32 is not a MUST. If suitable another hash code can be used as well. In case of CRC32 the...
5,282
Posted By pstein
Ok, thank you. BUT: I want to find files...
Ok, thank you.

BUT: I want to find files (so it must be -type f) AND
your egrep filter suppresses also files with pathes where /sys or /proc appears in the mid like

/usr/aaa/proc/dummy.log
...
5,282
Posted By pstein
Ok, thank you. However your solution does NOT...
Ok, thank you. However your solution does NOT work.
The final list contains lots of files beginning with /sys/
So I think the grep filtering does not work this way.
Maybe the grep is wrong.
Any...
5,282
Posted By pstein
Problem with "find" and "grep" command
I want to list all files/lines which except those which contain the pattern ' /proc/' OR ' /sys/' (mind the leading blank).

In a first approach I coded:

find / -exec ls -ld {} | grep -v '...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 03:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy